mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-09 23:18:47 +00:00
B - Who is missing?
https://atcoder.jp/contests/abc236/submissions/28730078
This commit is contained in:
parent
cb4719c0c9
commit
2cb9668697
24
AtCoder/ABC236/B/B.cpp
Normal file
24
AtCoder/ABC236/B/B.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
int n, a;
|
||||
std::map<int, int> map;
|
||||
|
||||
int main() {
|
||||
cin >> n;
|
||||
for (int i = 1; i < n * 4; i++) {
|
||||
cin >> a;
|
||||
map[a]++;
|
||||
}
|
||||
for (int i = 1; i <= n; i++) {
|
||||
if (map[i] == 3) {
|
||||
cout << i << endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user