| 记录编号 | 538544 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 76.[NOIP 2007]统计数字 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.456 s | ||
| 提交时间 | 2019-07-25 23:53:04 | 内存使用 | 15.18 MiB | ||
#include <bits/stdc++.h>
using namespace std;
long long int n,a[200001]={0},s=1;
int main(){
freopen("pcount.in","r",stdin);
freopen("pcount.out","w",stdout);
cin>>n;
for(int i=1;i<=n;i++)
cin>>a[i];
sort(a+1,a+n+1);
for(int i=2;i<=n+1;i++)
{
if(a[i]!=a[i-1])
{
cout<<a[i-1]<<" "<<s<<endl;
s=1;
}
else s++;
}
}