摘要: 简单的博弈DP爆搜改成记忆化搜索会爆栈,改成递推就好了。稍微用位运算优化了一下。。不过还是很慢#include #include #include #define Win 0#define Lose 1 using namespace std; int S[11],N,M;char note[100001]; inline char dp() { int n,p,i,j; for(i = 0;i < S[0];i++) note[i] = note[i] = Lose; for(i = S[0];i <= N;i++) { note[i] = 0; ... 阅读全文
posted @ 2013-12-20 17:34 acm_roll 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 复杂模拟,注意如果解题数目和解题总时间是一样的情况下两个人的名次是一样的。人的名次等于比他做得好的人数+1还有时间如果不足10要补零#include #include #include #include #include #include #include using namespace std; struct time { int h,m,s; time(int hh,int mm,int ss):h(hh),m(mm),s(ss){}; time():h(0),m(0),s(0){}; string tostr() { ostringstream s... 阅读全文
posted @ 2013-12-20 17:30 acm_roll 阅读(250) 评论(0) 推荐(0) 编辑