Submission #829706

#TimeUsernameProblemLanguageResultExecution timeMemory
829706rainboyToxic Gene (NOI23_toxic)C++17
2.03 / 100
2 ms388 KiB
#include "toxic.h"
#include <vector>

using namespace std;

typedef vector<int> vi;

void determine_type(int n) {
	vi cc(n, '?');
	for (int i = 0; i < n; i++)
		if (query_sample({ i + 1 }) == 0)
			cc[i] = 'T';
	int i = 0;
	while (cc[i] != 'T')
		i++;
	for (int j = 0; j < n; j++)
		if (cc[j] == '?')
			cc[j] = query_sample({ i + 1, j + 1 }) == 0 ? 'R' : 'S';
	for (i = 0; i < n; i++)
		answer_type(i + 1, cc[i]);
}
#Verdict Execution timeMemoryGrader output
Fetching results...