摘要: http://ac.jobdu.com/problem.php?id=1340教训1)按时休息,这一点比什么都重要,休息其实是在为自己争取时间2)头脑保持清醒,不要图省事3)仔细读题4)不要离开笔和纸,自己先拿手算算 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 char str1[12],str2[12]; 5 char str3[12],str4[12]; 6 7 void cp(char *src,char *dst) 8 { 9 int i,j=strlen(sr 阅读全文
posted @ 2011-11-26 18:27 linyvxiang 阅读(240) 评论(0) 推荐(0) 编辑
摘要: http://ac.jobdu.com/problem.php?id=1341类似当年浙大上机题目,不过这个明确指出可能有重边,剩下的事情就好做了 1 #include <stdio.h> 2 #define INF 0xfffffff 3 int mat[102][102]; 4 int N,M; 5 int dij(int a,int b) 6 { 7 bool visited[102]; 8 int min_road[102]; 9 int i,j;10 for(i=0;i<N;i++){11 visited[i]=false;12 ... 阅读全文
posted @ 2011-11-26 17:25 linyvxiang 阅读(185) 评论(0) 推荐(0) 编辑
摘要: http://ac.jobdu.com/problem.php?id=1339 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <algorithm> 5 using namespace std; 6 int N; 7 typedef struct Team{ 8 char name[102]; 9 int num;10 int punish;11 }Team;12 Team t[100];13 14 bool cmp(Team a,Team 阅读全文
posted @ 2011-11-26 15:29 linyvxiang 阅读(173) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2123 1 #include <stdio.h> 2 int C,N; 3 int main() 4 { 5 scanf("%d",&C); 6 while(C--){ 7 scanf("%d",&N); 8 int i,j; 9 for(i=1;i<=N;i++)10 for(j=1;j<=N;j++){11 printf("%d",i*j);12 if(j... 阅读全文
posted @ 2011-11-26 12:12 linyvxiang 阅读(252) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2212无聊题,打表,吃饭去1 #include <stdio.h>2 int main()3 {4 printf("1\n2\n145\n40585\n");5 } 阅读全文
posted @ 2011-11-26 11:26 linyvxiang 阅读(134) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2101快吃饭了,做点超级简单的 1 #include <stdio.h> 2 int main() 3 { 4 int a,b; 5 while(scanf("%d%d",&a,&b)!=EOF){ 6 if((a+b)%86==0) printf("yes\n"); 7 else printf("no\n"); 8 } 9 return 0;10 } 阅读全文
posted @ 2011-11-26 11:11 linyvxiang 阅读(172) 评论(0) 推荐(0) 编辑