Submission #552304

#TimeUsernameProblemLanguageResultExecution timeMemory
552304pckienCombo (IOI18_combo)C++17
10 / 100
71 ms580 KiB
#include <bits/stdc++.h>
#define fto(i, a, b) for (int i = a; i <= b; ++i)
using namespace std;

int n;
string haha[5] = {"A", "B", "X", "Y"};

int press(string p);

string guess_sequence(int n){
	int hoho, hehe = 0;
	string tmp = "", G = "";
	fto(i, 1, n){
		fto(j, 0, 3){
			tmp = G + haha[j];
			hoho = press(tmp);
			fflush(stdout);
			if (hehe < hoho){
				hehe = hoho;
				G = tmp;
				break;
			}
		}
	}	

	return G;
}


// #ifdef LOCALME
// int main() {
//     int n; cin >> n;
//     cout << guess_sequence(n) << endl;
//     return 0;
// }
// #endif
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...