Submission #411586

#TimeUsernameProblemLanguageResultExecution timeMemory
411586nichkeCombo (IOI18_combo)C++14
10 / 100
71 ms540 KiB
#include <bits/stdc++.h> using namespace std; string but = "ABXY"; string t = ""; set<int> s; int ff; int press(string p); string guess_sequence(int N) { string res = ""; for (int i = 0; i < 4; i++) { t = res; t += but[i]; if (press(t)) { res = t; ff = i; break; } } for (int i = 1; i < N; i++) { s.clear(); s.insert(ff); for (int j = 0; j < 4; j++) { if (j == ff) continue; if (s.size() == 3) { res += but[j]; break; } s.insert(j); t = res; t += but[j]; if (press(t) == i + 1) { res = t; break; } } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...