# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
252320 | 2020-07-25T09:20:56 Z | SamAnd | Languages (IOI10_languages) | C++17 | 1601 ms | 680 KB |
#include <bits/stdc++.h> #include "grader.h" #include "lang.h" using namespace std; const int N = 56; const int m = 100; set<int> s[N]; void excerpt(int *E) { int maxu = -1, maxi = -1; for (int i = 0; i < N; ++i) { int q = 0; for (int j = 0; j < m; ++j) { if (s[i].find(E[j]) != s[i].end()) ++q; } if (q > maxu) { maxu = q; maxi = i; } } int u = language(maxi); for (int j = 0; j < m; ++j) s[u].insert(E[j]); vector<int> v; for (int i = 0; i < N; ++i) { if (i == u) continue; for (auto it = s[u].begin(); it != s[u].end(); ++it) { if (s[i].find(*it) != s[i].end()) { v.push_back(*it); } } } for (int i = 0; i < N; ++i) { for (int j = 0; j < v.size(); ++j) { if (s[i].find(v[j]) != s[i].end()) s[i].erase(v[j]); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1601 ms | 680 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1584 ms | 648 KB | Output isn't correct - 25.89% |