# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
423519 | 2021-06-11T08:32:13 Z | 조영욱(#7649) | Monster Game (JOI21_monster) | C++17 | 232 ms | 416 KB |
#include "monster.h" #include <bits/stdc++.h> using namespace std; namespace { bool example_variable; vector<int> vec[199]; int cnt[200]; int ret[200]; } // namespace vector<int> Solve(int n) { vector<int> ret(n); for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if (Query(i,j)) { cnt[i]++; } else { cnt[j]++; } } } for(int i=0;i<n;i++) { vec[cnt[i]].push_back(i); } if (Query(vec[1][0],vec[1][1])) { ret[vec[1][0]]=0; ret[vec[1][1]]=1; } else { ret[vec[1][0]]=1; ret[vec[1][1]]=0; } if (Query(vec[n-2][0],vec[n-2][1])) { ret[vec[n-2][0]]=n-2; ret[vec[n-2][1]]=n-1; } else { ret[vec[n-2][0]]=n-1; ret[vec[n-2][1]]=n-2; } for(int i=0;i<n;i++) { if (cnt[i]!=1&&cnt[i]!=n-2) { ret[i]=cnt[i]; } } return ret; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 200 KB | Output is correct |
2 | Correct | 1 ms | 200 KB | Output is correct |
3 | Correct | 1 ms | 200 KB | Output is correct |
4 | Correct | 1 ms | 200 KB | Output is correct |
5 | Correct | 1 ms | 200 KB | Output is correct |
6 | Correct | 1 ms | 200 KB | Output is correct |
7 | Correct | 1 ms | 200 KB | Output is correct |
8 | Correct | 1 ms | 256 KB | Output is correct |
9 | Correct | 1 ms | 200 KB | Output is correct |
10 | Correct | 1 ms | 200 KB | Output is correct |
11 | Correct | 1 ms | 200 KB | Output is correct |
12 | Correct | 1 ms | 200 KB | Output is correct |
13 | Correct | 1 ms | 200 KB | Output is correct |
14 | Correct | 1 ms | 200 KB | Output is correct |
15 | Correct | 1 ms | 200 KB | Output is correct |
16 | Correct | 210 ms | 276 KB | Output is correct |
17 | Correct | 152 ms | 200 KB | Output is correct |
18 | Correct | 169 ms | 292 KB | Output is correct |
19 | Correct | 228 ms | 280 KB | Output is correct |
20 | Correct | 195 ms | 280 KB | Output is correct |
21 | Correct | 0 ms | 200 KB | Output is correct |
22 | Correct | 1 ms | 200 KB | Output is correct |
23 | Correct | 0 ms | 200 KB | Output is correct |
24 | Correct | 1 ms | 200 KB | Output is correct |
25 | Correct | 1 ms | 200 KB | Output is correct |
26 | Correct | 207 ms | 276 KB | Output is correct |
27 | Correct | 1 ms | 200 KB | Output is correct |
28 | Correct | 1 ms | 200 KB | Output is correct |
29 | Correct | 1 ms | 200 KB | Output is correct |
30 | Correct | 1 ms | 200 KB | Output is correct |
31 | Correct | 1 ms | 200 KB | Output is correct |
32 | Correct | 221 ms | 280 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 200 KB | Output is correct |
2 | Correct | 1 ms | 200 KB | Output is correct |
3 | Correct | 1 ms | 200 KB | Output is correct |
4 | Correct | 1 ms | 200 KB | Output is correct |
5 | Correct | 1 ms | 200 KB | Output is correct |
6 | Correct | 1 ms | 200 KB | Output is correct |
7 | Correct | 1 ms | 200 KB | Output is correct |
8 | Correct | 1 ms | 256 KB | Output is correct |
9 | Correct | 1 ms | 200 KB | Output is correct |
10 | Correct | 1 ms | 200 KB | Output is correct |
11 | Correct | 1 ms | 200 KB | Output is correct |
12 | Correct | 1 ms | 200 KB | Output is correct |
13 | Correct | 1 ms | 200 KB | Output is correct |
14 | Correct | 1 ms | 200 KB | Output is correct |
15 | Correct | 1 ms | 200 KB | Output is correct |
16 | Correct | 210 ms | 276 KB | Output is correct |
17 | Correct | 152 ms | 200 KB | Output is correct |
18 | Correct | 169 ms | 292 KB | Output is correct |
19 | Correct | 228 ms | 280 KB | Output is correct |
20 | Correct | 195 ms | 280 KB | Output is correct |
21 | Correct | 0 ms | 200 KB | Output is correct |
22 | Correct | 1 ms | 200 KB | Output is correct |
23 | Correct | 0 ms | 200 KB | Output is correct |
24 | Correct | 1 ms | 200 KB | Output is correct |
25 | Correct | 1 ms | 200 KB | Output is correct |
26 | Correct | 207 ms | 276 KB | Output is correct |
27 | Correct | 1 ms | 200 KB | Output is correct |
28 | Correct | 1 ms | 200 KB | Output is correct |
29 | Correct | 1 ms | 200 KB | Output is correct |
30 | Correct | 1 ms | 200 KB | Output is correct |
31 | Correct | 1 ms | 200 KB | Output is correct |
32 | Correct | 221 ms | 280 KB | Output is correct |
33 | Runtime error | 232 ms | 412 KB | Execution killed with signal 11 |
34 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 214 ms | 416 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |