| 记录编号 | 
        124636 | 
        评测结果 | 
        AAAAAAAAAA | 
    
    
        | 题目名称 | 
        76.[NOIP 2007]统计数字 | 
        最终得分 | 
        100 | 
            
    
    
        | 用户昵称 | 
         Asm.Def | 
        是否通过 | 
        通过 | 
    
    
        | 代码语言 | 
        C++ | 
        运行时间 | 
        0.150 s  | 
    
    
        | 提交时间 | 
        2014-10-05 09:28:43 | 
        内存使用 | 
        0.32 MiB  | 
        
    
    
    
    		显示代码纯文本
		
		#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
#define maxn (10000 + 5)
using namespace std;
FILE *in = fopen("pcount.in","r");
FILE *out = fopen("pcount.out","w");
map<int, int> cnt;
int n;
int main(){
	fscanf(in,"%d", &n);
	int k;
	while(n--)fscanf(in,"%d", &k),++cnt[k];
	map<int, int>::iterator it;
	for(it = cnt.begin();it != cnt.end();++it)
		fprintf(out,"%d %d\n", it->first, it->second);
	return 0;
}