제출 #232272

#제출 시각아이디문제언어결과실행 시간메모리
232272dannber_BR콤보 (IOI18_combo)C++14
10 / 100
86 ms548 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string Btns[] = {"A","B","X","Y"}; string s = ""; int p = 0; if (press(Btns[0]) == 1) { s += Btns[0]; p = 0; } else if (press(Btns[1]) == 1) { s += Btns[1]; p = 1; } else if (press(Btns[2]) == 1){ s += Btns[2]; p = 2; } else if (press(Btns[3]) == 1) { s += Btns[3]; p = 3; } for(int i = 2;i < N + 1;i++) { for(int j = 0;j <= 3;j++) { if(j != p) { if(press(s + Btns[j]) == i) { s += Btns[j]; break; } } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...