Submission #248819

#TimeUsernameProblemLanguageResultExecution timeMemory
248819rocks03Combo (IOI18_combo)C++14
30 / 100
66 ms572 KiB
#include<bits/stdc++.h> using namespace std; string a[4] = {"A", "B", "X", "Y"}; int press(string p); string guess_sequence(int N){ int res = 0; string ans = ""; for(int i = 0; i < 3; i++){ res = press(a[i]); if(!res) continue; ans += a[i]; swap(a[i], a[0]); break; } if(!res){ ans += a[3]; swap(a[0], a[3]); } for(int i = 1; i < N; i++){ res = press(ans+a[1]+ans+a[2]); if(res == i){ ans += a[3]; continue; } res = press(ans+a[1]); if(res == i){ ans += a[2]; continue; } ans += a[1]; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...