1 solutions
-
0
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; map<int,int> h; for(int i=1;i<=n;i++){ int x; cin>>x; h[x]++; } stack<int> tk; for(auto i:h){ tk.push(i.second); } int q=0; for(auto i:h){ cout<<tk.top()<<endl; tk.pop(); q++; } for(int i=1;i<=n-q;i++){ cout<<0<<endl; } return 0; }
- 1
Information
- ID
- 2623
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- # Submissions
- 3
- Accepted
- 3
- Uploaded By