摘要: 1A 没说的~~View Code #include <stdio.h>#include <string.h>#include <algorithm>using namespace std;struct node{ int t,deadline; char s[105];}ar[16];int n,m,Min,vis[16],path[16],ans[16],dp[70000];int d[]={1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768};int cmp(node a,node 阅读全文
posted @ 2011-10-28 14:12 104_gogo 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 找到规律了还是简单,不过郁闷的是要C++才不超时..if 匹配的个数>空格数 空格数+1;else 空格数=匹配个数;View Code 1 #include <stdio.h> 2 #include <string.h> 3 4 int k=1; 5 char s[100005][15]; 6 7 int match() 8 { 9 int i;10 for (i=0;s[k][i]&&s[k-1][i];i++)11 {12 if(s[k-1][i]!=s[k][i])return i;13 }14 return i;15 }1... 阅读全文
posted @ 2011-10-28 09:03 104_gogo 阅读(277) 评论(0) 推荐(0) 编辑