제출 #477043

#제출 시각아이디문제언어결과실행 시간메모리
477043Genius3435콤보 (IOI18_combo)C++17
컴파일 에러
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;
}

컴파일 시 표준 에러 (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;
      |        ^~~~~