제출 #1225115

#제출 시각아이디문제언어결과실행 시간메모리
1225115TIN콤보 (IOI18_combo)C++20
10 / 100
15 ms456 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; const string c = "ABXY"; string guess_sequence(int N) { string ret = ""; int cur_cnt = 0; char st = c[0]; for (int i = 0; i < N; i++) { for (int j = 0; j < 4; j++) { if (i != 0) if (c[j] == st) continue; string t = ret + c[j]; int cnt = press(t); if (cnt > cur_cnt) { if (i == 0) st = c[j]; ret.push_back(c[j]); cur_cnt = cnt; break; } } } return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...