Submission #828286

# Submission time Handle Problem Language Result Execution time Memory
828286 2023-08-17T07:48:30 Z 반딧불(#10380) Toxic Gene (NOI23_toxic) C++17
2.02692 / 100
3 ms 360 KB
#include "toxic.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int ans[302]; /// 0: toxic, 1: regular, 2: strong
char chr[] = "TRS";

void determine_type(int n){
	for(int i=1; i<=n; i++){
		if(query_sample(vector<int> (1, i)) == 1) ans[i] = 1;
		else ans[i] = 0;
	}
	int tox = find(ans+1, ans+n+1, 0) - ans;
	for(int i=1; i<=n; i++){
		if(!ans[i]) continue;
		if(query_sample(vector<int> {tox, i}) == 1) ans[i] = 2;
	}
	for(int i=1; i<=n; i++) answer_type(i, chr[ans[i]]);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Partially correct 1 ms 340 KB Partially correct
3 Partially correct 2 ms 340 KB Partially correct
4 Partially correct 2 ms 340 KB Partially correct
5 Partially correct 1 ms 340 KB Partially correct
6 Partially correct 1 ms 340 KB Partially correct
7 Partially correct 1 ms 340 KB Partially correct
8 Partially correct 1 ms 340 KB Partially correct
9 Partially correct 1 ms 340 KB Partially correct
10 Partially correct 2 ms 340 KB Partially correct
11 Partially correct 2 ms 340 KB Partially correct
12 Partially correct 1 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 1 ms 340 KB Partially correct
20 Partially correct 2 ms 340 KB Partially correct
21 Partially correct 2 ms 340 KB Partially correct
22 Partially correct 3 ms 340 KB Partially correct
23 Partially correct 1 ms 340 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 360 KB Partially correct
27 Partially correct 1 ms 340 KB Partially correct
28 Partially correct 1 ms 340 KB Partially correct
29 Partially correct 1 ms 340 KB Partially correct
30 Partially correct 1 ms 340 KB Partially correct
31 Partially correct 1 ms 340 KB Partially correct
32 Partially correct 1 ms 340 KB Partially correct
33 Partially correct 2 ms 340 KB Partially correct
34 Partially correct 1 ms 340 KB Partially correct
35 Partially correct 1 ms 340 KB Partially correct
36 Partially correct 0 ms 212 KB Partially correct