#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 |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Partially correct |
2 ms |
340 KB |
Partially correct |
3 |
Partially correct |
1 ms |
340 KB |
Partially correct |
4 |
Partially correct |
2 ms |
340 KB |
Partially correct |
5 |
Partially correct |
2 ms |
340 KB |
Partially correct |
6 |
Partially correct |
1 ms |
340 KB |
Partially correct |
7 |
Partially correct |
2 ms |
340 KB |
Partially correct |
8 |
Partially correct |
2 ms |
340 KB |
Partially correct |
9 |
Partially correct |
1 ms |
364 KB |
Partially correct |
10 |
Partially correct |
2 ms |
340 KB |
Partially correct |
11 |
Partially correct |
2 ms |
340 KB |
Partially correct |
12 |
Partially correct |
2 ms |
340 KB |
Partially correct |
13 |
Partially correct |
1 ms |
340 KB |
Partially correct |
14 |
Partially correct |
2 ms |
340 KB |
Partially correct |
15 |
Partially correct |
1 ms |
340 KB |
Partially correct |
16 |
Partially correct |
1 ms |
340 KB |
Partially correct |
17 |
Partially correct |
1 ms |
340 KB |
Partially correct |
18 |
Partially correct |
1 ms |
340 KB |
Partially correct |
19 |
Partially correct |
2 ms |
340 KB |
Partially correct |
20 |
Partially correct |
2 ms |
340 KB |
Partially correct |
21 |
Partially correct |
2 ms |
388 KB |
Partially correct |
22 |
Partially correct |
2 ms |
332 KB |
Partially correct |
23 |
Partially correct |
1 ms |
332 KB |
Partially correct |
24 |
Partially correct |
1 ms |
340 KB |
Partially correct |
25 |
Partially correct |
1 ms |
340 KB |
Partially correct |
26 |
Partially correct |
1 ms |
340 KB |
Partially correct |
27 |
Partially correct |
1 ms |
340 KB |
Partially correct |
28 |
Partially correct |
2 ms |
380 KB |
Partially correct |
29 |
Partially correct |
2 ms |
340 KB |
Partially correct |
30 |
Partially correct |
1 ms |
340 KB |
Partially correct |
31 |
Partially correct |
2 ms |
340 KB |
Partially correct |
32 |
Partially correct |
1 ms |
340 KB |
Partially correct |
33 |
Partially correct |
1 ms |
340 KB |
Partially correct |
34 |
Partially correct |
1 ms |
340 KB |
Partially correct |
35 |
Partially correct |
2 ms |
340 KB |
Partially correct |
36 |
Partially correct |
0 ms |
212 KB |
Partially correct |