摘要: #include #include char dic[10005][20];int t;int del(char a[],char b[]){ int i; for(i=0;a[i];i++) if(a[i]!=b[i]) break; if(!strcmp(a+i+1,b+i)) return 1; return 0;}int rep(char a[],char b[]){ int i; for(i=0;a[i];i++) if(a[i]!=b[i]) break; if(!st... 阅读全文
posted @ 2014-01-15 18:56 单调的幸福 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;structnode{ int x, y;} p[1005];bool Greater(const structnode &a, const structnode &b){ if (a.x == b.x) return a.y =p[j].y) //重复的正方形不要 { p1.x = p[i].x + p[j].y - p[i].y; p1.y = p[i].y + p[i].x - p[j].x; ... 阅读全文
posted @ 2014-01-15 17:58 单调的幸福 阅读(132) 评论(0) 推荐(0) 编辑
摘要: #include #define N 500005using namespace std;int a[N],a1[N];__int64 time; //范围为 -2^63 (-9,223,372,036,854,775,808) 到 2^63-1 (9,223,372,036,854,775,807),存储空间占 8 字节。void Merge (int s,int m,int t){ int i=s,j=m+1,k=0; while (i<=m && j<=t) { if(a[i]<=a[j]) a1[k++]=a[i++]; ... 阅读全文
posted @ 2014-01-15 12:56 单调的幸福 阅读(194) 评论(0) 推荐(0) 编辑