标签:style http io ar color os sp for on
1 3 2 3 3 4 1 7 0 0
1 10 2 3 3 4
#include<stdio.h> #include<string.h> int visit[110],a[110],b[110]; int main() { int n,m,j=0; while(scanf("%d%d",&n,&m),!(n==0&&m==0)) { if(!visit[n]) a[++j]=n,visit[n]=1; b[n]+=m; } for(int i=1;i<=j;++i) { printf("%d %d\n",a[i],b[a[i]]); } return 0; }
标签:style http io ar color os sp for on
原文地址:http://blog.csdn.net/qq_18062811/article/details/41770473