Submission #477043

#TimeUsernameProblemLanguageResultExecution timeMemory
477043Genius3435Combo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

const int t = chrono::high_resolution_clock::now().time_since_epoch().count();

string guess_sequence(int N) {
	static mt19937 rng = mt19937(t%10000/10);
	string cur = ""; cur.reserve(N);
	for (int i = 0; i < N; ++i) {
		const char *s = "ABXY";
		int order = rng() % 24;
		for (int o = 4; o >= 1; --o) {
			cur += s[order%o], order /= o;
			if (press(cur) == i+1) break;
			cur.pop_back();
		}
	}
	return cur;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:14:8: error: 'press' was not declared in this scope
   14 |    if (press(cur) == i+1) break;
      |        ^~~~~