제출 #588692

#제출 시각아이디문제언어결과실행 시간메모리
588692shezitt콤보 (IOI18_combo)C++14
10 / 100
61 ms456 KiB
#include "combo.h"
#include <bits/stdc++.h>
#define dbg(x) cerr << #x << ": " << x << endl;
#define raya cerr << "======================" << endl;

using namespace std;

string guess_sequence(int N) {
	string s = "";
	string aux = "ABXY";
	for(char c : aux){
		s += c;
		if(press(s)){
			break;
		}
		s.pop_back();
	}
	for(int i=1; i<N; ++i){
		for(int j=0; j<4; ++j){
			if(aux[j] == s[0]){
				continue;
			}
			if(j == 3){
				s += aux[j];
				break;
			}
			s += aux[j];
			if(press(s) == i+1){
				break;
			}
			s.pop_back();
		}
	}
	return s;
}

#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...