上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 99 下一页

2012年8月5日

模拟题。

摘要: 算法:没有什么bug.以后少用STL。。。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace std;map<string,int>mp;m 阅读全文

posted @ 2012-08-05 21:10 more think, more gains 阅读(186) 评论(0) 推荐(0) 编辑

搜索

摘要: 算法:题意比赛搞错了,只要最后彼此拿到的财务价值一样即可。搜索,2(40)次。加个if条件剪枝就可以了。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespac 阅读全文

posted @ 2012-08-05 21:09 more think, more gains 阅读(161) 评论(0) 推荐(0) 编辑

网络流

摘要: 求最大流后判断下那些边的容量为0即可。。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace std;#define MAXN 2000000struct 阅读全文

posted @ 2012-08-05 21:07 more think, more gains 阅读(131) 评论(0) 推荐(0) 编辑

closest 素数

摘要: View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace std;int pri[3200];bool visit[3200] = {0};int prime 阅读全文

posted @ 2012-08-05 21:05 more think, more gains 阅读(132) 评论(0) 推荐(0) 编辑

贪心

摘要: 算法:以结束时间从小到大排序,枚举比当前开始时间小的剩余房间,有足够不另开房间,没有足够的就加上缺少多少。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespa 阅读全文

posted @ 2012-08-05 21:04 more think, more gains 阅读(129) 评论(0) 推荐(0) 编辑

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 99 下一页

导航