#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); #define RD(v) int v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;} long buf[2*200000]; int h[200001]; #define WTSP(v) {long _z=v,_d=0x2020202020202020l;while(_d=_d<<8|0x30|_z%10,_z/=10);*wp++=_d;} #define WTLN(v) {long _z=v,_d=0x2020202020202020l;while(_d=_d<<8|0x30|_z%10,_z/=10);*wp++=_d^0x2al<<56;} main(){ char*rp=mmap(0l,7l*200002,1,2,0,0ll); while(*rp++!=32); RD(m); do{ RD(l); ++h[l]; }while(*rp); long*wp=buf; for(int i=0;++i<=m;){ WTSP(i); WTLN(h[i]); } write(1,buf,(wp-buf)*sizeof*buf); _exit(0); }