Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<map>
- #define endl '\n'
- using namespace std;
- int main() {
- cin.tie(NULL);
- ios::sync_with_stdio(false);
- int n, t;
- cin >> n;
- map<int, int> m;
- while (n--)
- cin >> t, m[t]++;
- for (const auto& [i, j] : m)
- cout << i << ' ' << j << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement