2012年10月29日

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勇者无惧 阅读(127) 评论(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勇者无惧 阅读(133) 评论(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勇者无惧 阅读(132) 评论(0) 推荐(0) 编辑

导航