UVA484
一直RE,快疯了,有没有大佬帮忙看看。
代码如下:
#include <bits/stdc++.h>
using namespace std;
int n,a[100000001],t[100000001],temp;
int main(){
while(~scanf("%d",&temp)){
if(!t[temp]){
a[++n]=temp;
}
t[temp]++;
}
for(int i=1;i<=n;i++){
printf("%d %d\n",a[i],t[a[i]]);
}
return 0;
}