Submission #562436

#TimeUsernameProblemLanguageResultExecution timeMemory
5624361zaid1Combo (IOI18_combo)C++14
30 / 100
56 ms460 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int n) { vector<string> v = {"A", "B", "X", "Y"}; string cum = ""; if (press(cum+v[0]+cum+v[1])) { if (press(cum + v[0])) swap(v[0], v[3]); else swap(v[1], v[3]); } else { if (press(cum + v[2])) swap(v[2], v[3]); } cum += v.back(); v.pop_back(); for (int k = 2; k <= n; k++) { if (press(cum+v[0]+cum+v[1]) == k) { if (press(cum + v[0]) == k) cum += v[0]; else cum += v[1]; } else cum += v[2]; } return cum; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...