제출 #1006863

#제출 시각아이디문제언어결과실행 시간메모리
1006863GTA콤보 (IOI18_combo)C++17
10 / 100
37 ms928 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; #define fr(m,n,k) for(int m=n;m<=k;m++) int n; string guess_sequence(int N) { n = N; string v = "ABXY"; string p; int a; fr(j, 0, 3) { p = v[j]; int x = press(p); if (x == 1) { a = j; break; } if (j == 2) { a = 3; break; } } p = v[a]; fr(i, 2, n) { fr(j, 0, 3) { if (j == a) continue; p += v[j]; int x = press(p); if (x == i) { break; } else p.erase(--p.end()); if (j == 2) { p += v[3]; break; } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...