제출 #151262

#제출 시각아이디문제언어결과실행 시간메모리
151262dennisstar콤보 (IOI18_combo)C++11
10 / 100
95 ms436 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
char ar[]="ABXY";
string guess_sequence(int N) {
	std::string p = "";
	int i, j;
	p+=' ';
	for (i=0; i<4; i++) {
		p[0]=ar[i];
		if (press(p)) break;
	}
	for (i=1; i<N; i++) {
		p+=' ';
		for (j=0; j<4; j++) {
			if (ar[j]==p[0]) continue;
			p[i]=ar[j];
			if (press(p)==i+1) break;
		}
	}
	return p;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...