摘要: 直接枚举a1和d。View Code 1 /* 2 ID: your_id_here 3 PROG: ariprog 4 LANG: C++ 5 */ 6 #include <iostream> 7 #include<cstdio> 8 #include<cstring> 9 using namespace std;10 int f[200000];11 int main()12 {13 freopen("ariprog.in","r",stdin);14 freopen("ariprog.out" 阅读全文
posted @ 2012-11-12 20:40 _雨 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 之前做的一道题,忘记发了,纠结了好久,把题意想复杂了,就是直接枚举*号位置上的数。View Code 1 /* 2 ID: your_id_here 3 PROG: crypt1 4 LANG: C++ 5 */ 6 #include <iostream> 7 #include<cstdio> 8 #include<string.h> 9 using namespace std;10 int count,f[100];11 int judge(int s)12 {13 int i,flag = 1,m = s;14 while(s)15 {16 ... 阅读全文
posted @ 2012-11-12 19:42 _雨 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 做了几天,bfs一直超内存,dfs一直死循环,最后直接枚举过了,每个操作最多用3次,9重循环枚举每个操作的次数。View Code 1 /* 2 ID: your_id_here 3 PROG: clocks 4 LANG: C++ 5 */ 6 #include <iostream> 7 #include<cstdio> 8 #include<cstring> 9 using namespace std; 10 int pjudge(int *x,int *a) 11 { 12 int i,j,k; 13 int flag = 1; 14 ... 阅读全文
posted @ 2012-11-12 19:38 _雨 阅读(202) 评论(2) 推荐(0) 编辑