제출 #296921

#제출 시각아이디문제언어결과실행 시간메모리
296921AMO5콤보 (IOI18_combo)C++17
0 / 100
0 ms200 KiB
#include "combo.h"
#include <bits/stdc++.h>

using namespace std;

#define ii pair<int,int>
#define fi first
#define se second
#define ll long long 
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()

const int mxn = 1e5;
const string t = "ABXY";

string guess_sequence(int N) {
	string s = "";
	int ptr = 0;
	int dif = -1;
	while(ptr<N){
		int cnt = 0;
		for(int i=0; i<4; i++){
			if(i==dif)continue;
			if(cnt==2){
				s=s+t[i];
				if(ptr==0){
					dif=i;
				}
				break;
			}
			int now = press(s+t[i]);
			if(now==ptr+1){
				s=s+t[i];
				if(ptr==0){
					dif=i;
				}
				break;
			}
			cnt++;
		}
		ptr++;
	}
	return s;
}

/*
int main(){
	//ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	guess_sequence(5);
	return 0;
}
// */ 

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