# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
67568 | 2018-08-15T02:50:41 Z | usefulhyun | Languages (IOI10_languages) | C++17 | 309 ms | 2528 KB |
#include <stdlib.h> #include <stdio.h> #include <unordered_map> using namespace std; #include "grader.h" #include "lang.h" #define SZ 100 unordered_map<int, int> lang(100000); int cnt = 0; void excerpt(int *E) { int guess = rand()%56; for (int i = 0; i < 100; i++) { int key = E[i]; if (lang.find(key) != lang.end() && lang[key] != 56) guess = lang[key]; } for (int i = 0; i < 99; i++) { int key = E[i]*65536 + E[i + 1]; if (lang.find(key) != lang.end() && lang[key] != 56) guess = lang[key]; } int answer = language(guess); for (int i = 0; i < 100; i++) { int key = E[i]; if (lang.find(key) == lang.end()) lang[key] = answer; else if (lang[key] != answer) lang[key] = 56; } for (int i = 0; i < 99; i++) { int key = E[i] * 65536 + E[i + 1]; if (lang.find(key) == lang.end()) lang[key] = answer; else if (lang[key] != answer) lang[key] = 56; } cnt++; if (cnt%100 == 0) printf("%d %d\n", cnt, lang.size()); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 285 ms | 2528 KB | Hacked. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 309 ms | 2524 KB | Hacked. |