-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path484.cpp
More file actions
33 lines (33 loc) · 794 Bytes
/
484.cpp
File metadata and controls
33 lines (33 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* ____
* ____ ___ ____ ________ __/ __/
* / __ `__ \/ __ `/ ___/ / / / /_
* / / / / / / /_/ / / / /_/ / __/
* /_/ /_/ /_/\__,_/_/ \__,_/_/
*
* @link : https://the-redback.com
*/
#include <bits/stdc++.h>
using namespace std;
#define inf HUGE_VAL
#define mem(a, b) memset(a, b, sizeof(a))
#define mod 1000000007
map<int, int> mp;
vector<int> v;
int main() {
char a[50];
int ret = 0;
int n, i, k, r, s;
int tc, t = 1;
while (~scanf("%d", &s)) {
if (mp.find(s) == mp.end()) {
mp[s] = 1;
v.push_back(s);
} else
mp[s]++;
}
for (i = 0; i < v.size(); i++) printf("%d %d\n", v[i], mp[v[i]]);
v.clear();
mp.clear();
return 0;
}