제출 #503677

#제출 시각아이디문제언어결과실행 시간메모리
503677cristi_a콤보 (IOI18_combo)C++17
10 / 100
55 ms588 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int N) { vector<string> letters = {"A", "B", "X", "Y"}; string rez = ""; for(vector<string>::iterator i=letters.begin(); i!=letters.end(); i++) if(press(*i)) { rez = rez + *i; letters.erase(i); break; } for(int i=1; i<N; i++) { //cout << rez + letters[0] << " " << press(rez+letters[0]) << "\n"; //cout << rez + letters[1] << " " << press(rez+letters[1]) << "\n"; //cout << rez + letters[2] << " " << press(rez+letters[2]) << "\n\n"; if(press(rez+letters[0])==i+1) rez = rez + letters[0]; else if(press(rez+letters[1])==i+1) rez = rez + letters[1]; else rez = rez + letters[2]; } return rez; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...