Submission #418724

#TimeUsernameProblemLanguageResultExecution timeMemory
418724peuchSeats (IOI18_seats)C++17
Compilation error
0 ms0 KiB
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;

string guess_sequence(int N) {
	string ord[4] = {"A", "B", "X", "Y"};
	srand(time(0));
	random_shuffle(ord, ord + 4);
	for(int i = 3; i > 0; i--){
		if(press(ord[i]) == 0) continue;
		swap(ord[i], ord[0]);
		break;
	}
	string ans = ord[0];
	random_shuffle(ord + 1, ord + 4);
	for(int i = 2; i < N; i++){
		string guess = ans + ord[1];
		guess = guess + ans + ord[2] + ord[1];
		guess = guess + ans + ord[2] + ord[2];
		guess = guess + ans + ord[2] + ord[3];
		int cnt = press(guess);
		if(cnt == i) ans = ans + ord[1];
		else if(cnt == i + 1) ans = ans + ord[2];
		else ans = ans + ord[3];
	}
	if(press(ans + ord[1]) == N) return ans + ord[1];
	if(press(ans + ord[2]) == N) return ans + ord[2];
	return ans + ord[3];
}

Compilation message (stderr)

seats.cpp:1:10: fatal error: combo.h: No such file or directory
    1 | #include "combo.h"
      |          ^~~~~~~~~
compilation terminated.