Submission #1194594

#TimeUsernameProblemLanguageResultExecution timeMemory
1194594ahmetlbktd4Combo (IOI18_combo)C++20
0 / 100
0 ms408 KiB
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;

string guess_sequence(int n){
	string s = "";
	int p[3] = {0,1,2};
	lab:if (p[0] > 3){
		return "";
	}	
	for (int i = 2;i > 0;i--){
		if (p[i] > 3){
			p[i] = 1;p[i-1]++;goto lab;
		}
	}
	for (int i = 1;i < 3;i++){
		if (p[i] == p[0])
		goto label;	
	}
	for (int i = 0;i < 3;i++){
		if (p[i] == 0)
		s+="A";
		if (p[i] == 1)
		s+="B";
		if (p[i] == 2)
		s+="X";
		if (p[i] == 3)
		s+="Y";
	}
	label:int h = press(s);
	if (h == n){
		return s;
	}
	p[2]++;goto lab;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...