摘要: #define _CRT_SECURE_NO_DEPRECATE #include<stdio.h> int main() { int year1; char arr[82][82]; char ch[2] = { '@','W' }; int n = 7, f = 0; char x; int i 阅读全文
posted @ 2018-03-20 17:51 王毅2016 阅读(162) 评论(0) 推荐(0) 编辑
摘要: /* 老板给员工发工资,分成n份,每切一刀收取所划分原长度的价格,用花费最少的方案权重最优问题,哈夫曼树 */#也可以考虑小顶堆来求最小的两个数据 #include void ArrSortInsert(int arr[], int n) { int temp; for (int i = 1; i = 0 && arr[j] > temp) { ... 阅读全文
posted @ 2018-03-20 17:42 王毅2016 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int IsRun(int year) { if(year%4==0&&year%100!=0||year%400==0) return 1; else return 0; } void huafen(int &year,int &month,int &day) 阅读全文
posted @ 2018-03-20 17:40 王毅2016 阅读(266) 评论(0) 推荐(0) 编辑