Precreation contest files
This commit is contained in:
11
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/input1
Normal file
11
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/input1
Normal file
@@ -0,0 +1,11 @@
|
||||
5
|
||||
5
|
||||
1 0 0 1 2
|
||||
6
|
||||
3 2 0 4 5 1
|
||||
6
|
||||
1 2 0 1 3 2
|
||||
4
|
||||
0 3 4 1
|
||||
5
|
||||
0 0 0 0 0
|
||||
5
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/output1
Normal file
5
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/output1
Normal file
@@ -0,0 +1,5 @@
|
||||
1 2 4 3 2 1
|
||||
1 6 5 4 3 2 1
|
||||
1 3 5 4 3 2 1
|
||||
1 3 3 2 1
|
||||
1 1 1 1 1 1
|
||||
31
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/solution.cpp
Normal file
31
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/solution.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "iostream"
|
||||
#include <map>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void solve() {
|
||||
int n, x;
|
||||
cin >> n;
|
||||
map<int, int> hash_map;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
cin >> x;
|
||||
if (hash_map.count(x) == 0)
|
||||
hash_map[x] = 1;
|
||||
else
|
||||
hash_map[x]++;
|
||||
}
|
||||
|
||||
for (int k = 0; k <= n; k++) {
|
||||
int cur_mex = 0;
|
||||
for (auto &i : hash_map) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
int t;
|
||||
cin >> t;
|
||||
while (t--)
|
||||
solve();
|
||||
}
|
||||
Reference in New Issue
Block a user