aboutsummaryrefslogtreecommitdiff
path: root/codeforces/cutTheSticksJoe/cutTheSticksJoe.cpp
blob: 45040623921cf11910732e47e59ed6b78a07426b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    ++mp[x];
  }
  for (auto p : mp) {
    cout << n << '\n';
    n -= p.second;
  }
  return 0;
}