摘要: 本来以为是一个好高深的DP的,看了看数据范围,枚举啊。。。n和m分不清了,错了好几次,以后用题目里面的变量,养成好习惯。。。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: holstein 5 */ 6 #include <cstdio> 7 #include <cstring> 8 #include <cmath> 9 #include <algorithm>10 using namespace std;11 int o[21],c[30],p[20][40],t[30],an[21];12 int main()1 阅读全文
posted @ 2012-11-06 15:14 Naix_x 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 很不错的一个题。开始自己想了一个策略,然后写了150+代码。。。WA后,发现策略可能有问题,貌似有更简单的办法,自己想的策略是错的,敲的各种if else,想清楚再写啊。。。这个题目应该算是贪心把。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: sort3 5 */ 6 #include <cstdio> 7 #include <cstring> 8 #include <cmath> 9 #include <algorithm>10 using namespace std;11 int p[1011],o[4];12 阅读全文
posted @ 2012-11-06 09:04 Naix_x 阅读(174) 评论(0) 推荐(0) 编辑