Submission #940990

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9409902024-03-08 04:30:06LittleFlowers__Toxic Gene (NOI23_toxic)C++17
9.46 / 100
8 ms504 KiB
#include <bits/stdc++.h>
#include "toxic.h"
using namespace std;
void determine_type (int n) {
auto query_wrapper = [&](vector<int> q) {
for (const int& i : q) assert(1 <= i && i <= n);
int result = query_sample(q);
assert(result != -1);
return result;
};
vector<bool> answered(n + 1, false);
auto answer_wrapper = [&](int i, char ch) {
assert(!answered[i] && 1 <= i && i <= n && (ch == 'S' || ch == 'T' || ch == 'R'));
answer_type(i, ch);
answered[i] = true;
return;
};
vector<bool> mark(n + 1);
int toxic = 0;
for(int i = 1; i <= n; i++) mark[i] = 0;
for(int i = 1; i <= n; i++) if (query_wrapper({i}) == 0) {
answer_wrapper(i, 'T');
toxic = i;
mark[i] = 1;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...