10 2012 档案

2012 金华现场赛K题
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4452英语弱成渣,没看懂题目之前,样例没看明白。。trun around没注意。还有交换方向的时候理解错一句话,应该是题目写错了。模拟就是View Code 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 int n,t1,s1,t2,s2,k; 7 char ch1,ch2; 8 char temp1,temp2; 9 int x1,y1,x2,y2; 10 int ... 阅读全文

posted @ 2012-10-30 14:52 仁者无敌8勇者无惧 阅读(186) 评论(0) 推荐(0)

2012 金华现场赛 J题
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4451View Code 1 #include <stdio.h> 2 #include<string.h> 3 #include <stdlib.h> 4 int main() 5 { 6 int n,m,k,n1,m1,k1; 7 int in[1010]; 8 int to[1010]; 9 int c,i,num1,num2;10 char str1[20],str2[20];11 while(~scanf("%d%d%d",&n,&am 阅读全文

posted @ 2012-10-29 22:26 仁者无敌8勇者无惧 阅读(155) 评论(0) 推荐(0)

2012 金华现场赛 I题
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4450巨水题,不解释View Code 1 #include<stdio.h> 2 int main() 3 { 4 int n; 5 int c; 6 int i; 7 while(~scanf("%d",&n),n) 8 { 9 int sum=0;10 for(i=0;i<n;i++)11 {12 scanf("%d",&c);13 sum+=c*c;14 ... 阅读全文

posted @ 2012-10-29 22:05 仁者无敌8勇者无惧 阅读(147) 评论(0) 推荐(0)

2012 金华现场赛 A题
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4442比赛时做得很差,考虑时没考虑清楚,也正因为这样,才拖了很久,,最后一分钟提交,拿了个顽强拼搏奖,哈哈哈。。贪心:设已经排好一些,花时间t,然后考虑两情况哪种好(node[i].a,node[i].b),node[j].a,node[j].b),必有t+node[i].a+node[i].b*t+node[j].a+node[j].b(t+node[i].a+node[i].b*t)<=t+node[j].a+node[j].b*t+node[i].a+node[i].b(t+node[j].a+n 阅读全文

posted @ 2012-10-29 21:56 仁者无敌8勇者无惧 阅读(140) 评论(0) 推荐(0)

位运算
摘要:位运算比关系运算优先级低,果断被坑了…………a=1,b=1;if(a^b>=0) printf("YES\n");else printf("NO\n");//输出NO,我以为YES。。。巨囧。。。 阅读全文

posted @ 2012-10-25 20:19 仁者无敌8勇者无惧 阅读(101) 评论(0) 推荐(0)

hdu 2544 2066 1874 2680
摘要:View Code 1 #include<stdio.h> 2 #include<string.h> 3 #define maxn 110 4 #define INF 0x7ffffff 5 #define Max(a,b) a>b?a:b 6 int graph[maxn][maxn]; 7 int vis[maxn]; 8 int dis[maxn]; 9 int n,m;10 void dijkstra()11 {12 int min,now;13 memset(vis,0,sizeof(vis));14 dis[1]=0;15 vis[1]=1;16 .. 阅读全文

posted @ 2012-10-15 22:12 仁者无敌8勇者无惧 阅读(128) 评论(0) 推荐(0)

伤感!
摘要:还是什么都不会…… 阅读全文

posted @ 2012-10-11 17:22 仁者无敌8勇者无惧 阅读(101) 评论(0) 推荐(0)

hdu 1205吃糖果
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1205水题一枚,糊里糊涂就过了!!View Code 1 #include<stdio.h> 2 int main() 3 { 4 int t; 5 int n; 6 int x,max,sum; 7 scanf("%d",&t); 8 while(t--) 9 {10 max=0;11 sum=0;12 scanf("%d",&n);13 for(int i=0;i<n;i++)14 ... 阅读全文

posted @ 2012-10-09 19:32 仁者无敌8勇者无惧 阅读(143) 评论(0) 推荐(0)

导航