RE 求助
查看原帖
RE 求助
807266
houwz351楼主2023/7/31 23:26

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;
}
2023/7/31 23:26
加载中...