제출 #787170

#제출 시각아이디문제언어결과실행 시간메모리
787170resolve100콤보 (IOI18_combo)C++14
0 / 100
3083 ms208 KiB
#include<bits/stdc++.h> #include "combo.h" #define ll long long #define ull unsigned ll #define pb push_back #define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) using namespace std; string guess_sequence(int N){ string chars[] = {"A", "B", "X", "Y"}; bool used[4]; for (int i = 0; i < 4; i++) used[i] = false; string out; for (int i = 0; i < 3; i++){ int num = press(chars[i]); if (num){ out+=chars[i]; used[i] = true; break; } } if (out.empty()) out.append(chars[3]); for (int i = 1; i < N; i++){ int num; for (int j = 0; j < 3; i++){ if (used[j]) continue; num = press(out+chars[j]); if (num == i+1){ out.append(chars[i]); break; } } if (num == i) out.append(chars[3]); } return out; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...