# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
829706 | rainboy | Toxic Gene (NOI23_toxic) | C++17 | 2 ms | 388 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |