上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 99 下一页

2011年4月30日

畅通工程

摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>#include<algorithm>using namespace std;struct node{ int i; int j; int v;}T[5000];int father[110],rank[110];int N,M,t;int cmp(node a,node b){ return a.v<b.v;}int find(int x){ return x==father[x]?x:father[x]=find(father[x] 阅读全文

posted @ 2011-04-30 10:32 more think, more gains 阅读(140) 评论(0) 推荐(0) 编辑

继续畅通工程

摘要: #include<stdio.h>#include<stdlib.h>#include<algorithm>using namespace std;struct node{ int i,j,v,u;}T[10100];int father[10100],N,M;int cmp(node a,node b){ return a.v<b.v;}int find(int x){ return x==fa... 阅读全文

posted @ 2011-04-30 09:34 more think, more gains 阅读(152) 评论(0) 推荐(0) 编辑

as easy as A+B

摘要: #include<stdio.h>#include<algorithm>using namespace std;int A[100000];int main( ){ int N;scanf("%d",&N);while(N--){ int i,p;scanf("%d",&p);for(i=0;i<p;i++)scanf("%d",&A[i]);sort(A,A+p);for(i=0;i<p;i++)printf(i?" %d":"%d" 阅读全文

posted @ 2011-04-30 08:03 more think, more gains 阅读(216) 评论(0) 推荐(0) 编辑

2011年4月29日

A|B超水

摘要: #include<stdio.h>int main( ){ int N,a,b; scanf("%d",&N); while(N--) { scanf("%d%d",&a,&b); if(a%b==0) printf("YES\n"); else printf("NO\n");}return 0;} 阅读全文

posted @ 2011-04-29 22:27 more think, more gains 阅读(125) 评论(0) 推荐(0) 编辑

MAX NUM

摘要: #include<stdio.h>#include<algorithm>using namespace std;int main( ){ int t,i,N; double A[10000]; scanf("%d",&N); while(N--) { scanf("%d",&t); for(i=0;i<t;i++) scanf("%lf",&A[i]); sort(A,A+t); printf("%.2lf\n",A[t-1]); } return 0;} 阅读全文

posted @ 2011-04-29 22:24 more think, more gains 阅读(138) 评论(0) 推荐(0) 编辑

上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 99 下一页

导航