fdf

糜宗易  •  3天前


int n; 
map<int,int>a; 
for(int i = 1;i <= n;i++){ 
 int x; 
 cin >> x; 
 a[x]--; 

for(int i = 1;i <= n;i++){ 
 if(a[i]){ 
  cout << i << ":" << a[i] << " "; 
 } 
}


评论: