摘要: 这个题,不简单啊,虽说是模拟,但是需要注意的情况有很多。开始看错了题,理解正确题意之后,依旧写了很久,错了N次后,终于到了最后一组数据,终于给水过去了,最后一种情况我是分两种情况讨论的,也不知写的对不对。。。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: packrec 5 */ 6 #include <iostream> 7 #include <cstdio> 8 #include <cstring> 9 #include <cstdlib> 10 #include <map> 11 #include 阅读全文
posted @ 2012-10-24 21:26 Naix_x 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1Y,没写DFS,直接5个for。。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: crypt1 5 */ 6 #include <iostream> 7 #include <cstdio> 8 #include <cstring> 9 #include <cstdlib>10 #include <map>11 #include <algorithm>12 using namespace std;13 int p[11],o[11];14 int judge(int x)15 {16 whil 阅读全文
posted @ 2012-10-24 16:26 Naix_x 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 枚举+标记即可。/* ID: cuizhe LANG: C++ TASK: calfflac*/#include <iostream>#include <cstdio>#include <cstring>#include <cstdlib>#include <map>#include <algorithm>using namespace std;char str[30001],p[30001];int o[30001];int main(){ int i,j,len,num,ans,t1,t2,st,end; char c 阅读全文
posted @ 2012-10-24 13:37 Naix_x 阅读(123) 评论(0) 推荐(0) 编辑