제출 #128830

#제출 시각아이디문제언어결과실행 시간메모리
128830Talant콤보 (IOI18_combo)C++17
30 / 100
62 ms444 KiB
//#include "grader.cpp" #include "combo.h" #include <bits/stdc++.h> #define sc second #define fr first #define mk make_pair #define pb push_back using namespace std; const int NN = (1e6 + 5); const int inf = (1e9 + 7); string a,s; int f; string guess_sequence(int n) { if (press("A") > 0) f = 1,a += "A"; else if (press("B") > 0) f = 2,a += "B"; else if (press("X") > 0) f = 3,a += "X"; else f = 4,a += "Y"; if (f != 1) s += "A"; if (f != 2) s += "B"; if (f != 3) s += "X"; if (f != 4) s += "Y"; for (int i = 2; i <= n; i ++) { if (press(a + s[0]) == i) { a += s[0]; continue; } else if (press(a + s[1]) == i) { a += s[1]; continue; } else { a += s[2]; continue; } } return a; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...