Submission #570030

#TimeUsernameProblemLanguageResultExecution timeMemory
570030OrazBCombo (IOI18_combo)C++14
10 / 100
56 ms448 KiB
#include "combo.h" #include <bits/stdc++.h> // #define N 100005 #define wr cout << "Continue debugging\n"; #define ll long long int #define pii pair <int, int> #define pb push_back #define ff first #define ss second using namespace std; string guess_sequence(int N){ string t = "ABXY", p = ""; int tr = 0, idx = 0; for (int i = 0; i < 3; i++){ p.clear(); p += t[i]; if (press(p)){tr = 1; idx = i; break;} } if (!tr){ p.clear(); p += t[3]; idx = 3; } string tt = ""; for (int i = 0; i < 4; i++) if (idx != i) tt += t[i]; for (int i = 1; i < N; i++){ for (int j = 0; j < 3; j++){ p += tt[j]; if (press(p) == i + 1) break; p.pop_back(); } } return p; } // int main () // { // }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...