摘要: 题目链接其实这个题不算难。。。可是题意就没搞懂,此题为恰好m件,WA到死啊。初始化为一个很大的负数,就能解决这个问题。 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <math.h> 5 int p[101][1001]; 6 int ti[101],v[101]; 7 int main() 8 { 9 int t,i,j,n,m,l,k,max;10 scanf("%d",&t);11 while(t--)12 阅读全文
posted @ 2012-08-17 21:15 Naix_x 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目链接有点BFS的思想,不过还是感觉像是乱搞题。。 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #define N 200001 5 #define M 10007 6 char str[N]; 7 int p[N]; 8 int main() 9 {10 int i,j,t,n,start,end,ans;11 scanf("%d",&t);12 while(t--)13 {14 scanf("%d%*c",& 阅读全文
posted @ 2012-08-17 19:01 Naix_x 阅读(146) 评论(0) 推荐(0) 编辑