mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-14 05:18:48 +00:00
20 lines
355 B
C++
20 lines
355 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
set<int> s;
|
|
map<int, int> m;
|
|
int n, t;
|
|
cin >> n;
|
|
while (n--) {
|
|
cin >> t;
|
|
s.insert(t);
|
|
m[t]++;
|
|
}
|
|
for (set<int>::iterator it = s.begin(); it != s.end(); it++) {
|
|
cout << *it << ' ' << m[*it] << endl;
|
|
}
|
|
return 0;
|
|
}
|