# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
377606 | 2021-03-14T11:28:53 Z | jass921026 | Minerals (JOI19_minerals) | C++14 | 32 ms | 2740 KB |
#include "minerals.h" #include<bits/stdc++.h> using namespace std; vector<int> vl, vr; void find_out(vector<int> &x, vector<int> &y){ if(x.size()==1){ Answer(x[0],y[0]); return; } vector<int> x1, x2, y1, y2; int v=0; for(int i=0;i<x.size();i++){ if(i<x.size()/2) x1.push_back(x[i]); else x2.push_back(x[i]); } for(int i=0;i<x.size()/2;i++){ v=Query(x[i]); } for(int i=0;i<y.size();i++){ int tmp=Query(y[i]); if(tmp==v) y1.push_back(y[i]); else y2.push_back(y[i]); tmp=Query(y[i]); } for(int i=0;i<x.size()/2;i++){ v=Query(x[i]); } find_out(x1,y1); find_out(x2,y2); } void Solve(int N) { int v=0; for(int i=1;i<=2*N;i++){ int tmp=Query(i); if(tmp==v+1){ v++; vl.push_back(i); } else{ vr.push_back(i); } } for(int i=1;i<=2*N;i++) v=Query(i); find_out(vl,vr); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 2 ms | 492 KB | Output is correct |
3 | Correct | 5 ms | 492 KB | Output is correct |
4 | Correct | 9 ms | 748 KB | Output is correct |
5 | Correct | 20 ms | 1132 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 492 KB | Output is correct |
7 | Correct | 5 ms | 492 KB | Output is correct |
8 | Correct | 9 ms | 748 KB | Output is correct |
9 | Correct | 20 ms | 1132 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |
11 | Correct | 12 ms | 1004 KB | Output is correct |
12 | Correct | 23 ms | 1260 KB | Output is correct |
13 | Correct | 15 ms | 1132 KB | Output is correct |
14 | Correct | 15 ms | 1132 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 492 KB | Output is correct |
7 | Correct | 5 ms | 492 KB | Output is correct |
8 | Correct | 9 ms | 748 KB | Output is correct |
9 | Correct | 20 ms | 1132 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |
11 | Correct | 12 ms | 1004 KB | Output is correct |
12 | Correct | 23 ms | 1260 KB | Output is correct |
13 | Correct | 15 ms | 1132 KB | Output is correct |
14 | Correct | 15 ms | 1132 KB | Output is correct |
15 | Incorrect | 32 ms | 2740 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 492 KB | Output is correct |
7 | Correct | 5 ms | 492 KB | Output is correct |
8 | Correct | 9 ms | 748 KB | Output is correct |
9 | Correct | 20 ms | 1132 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |
11 | Correct | 12 ms | 1004 KB | Output is correct |
12 | Correct | 23 ms | 1260 KB | Output is correct |
13 | Correct | 15 ms | 1132 KB | Output is correct |
14 | Correct | 15 ms | 1132 KB | Output is correct |
15 | Incorrect | 32 ms | 2740 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 492 KB | Output is correct |
7 | Correct | 5 ms | 492 KB | Output is correct |
8 | Correct | 9 ms | 748 KB | Output is correct |
9 | Correct | 20 ms | 1132 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |
11 | Correct | 12 ms | 1004 KB | Output is correct |
12 | Correct | 23 ms | 1260 KB | Output is correct |
13 | Correct | 15 ms | 1132 KB | Output is correct |
14 | Correct | 15 ms | 1132 KB | Output is correct |
15 | Incorrect | 32 ms | 2740 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 492 KB | Output is correct |
7 | Correct | 5 ms | 492 KB | Output is correct |
8 | Correct | 9 ms | 748 KB | Output is correct |
9 | Correct | 20 ms | 1132 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |
11 | Correct | 12 ms | 1004 KB | Output is correct |
12 | Correct | 23 ms | 1260 KB | Output is correct |
13 | Correct | 15 ms | 1132 KB | Output is correct |
14 | Correct | 15 ms | 1132 KB | Output is correct |
15 | Incorrect | 32 ms | 2740 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 492 KB | Output is correct |
7 | Correct | 5 ms | 492 KB | Output is correct |
8 | Correct | 9 ms | 748 KB | Output is correct |
9 | Correct | 20 ms | 1132 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |
11 | Correct | 12 ms | 1004 KB | Output is correct |
12 | Correct | 23 ms | 1260 KB | Output is correct |
13 | Correct | 15 ms | 1132 KB | Output is correct |
14 | Correct | 15 ms | 1132 KB | Output is correct |
15 | Incorrect | 32 ms | 2740 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 2 ms | 492 KB | Output is correct |
7 | Correct | 5 ms | 492 KB | Output is correct |
8 | Correct | 9 ms | 748 KB | Output is correct |
9 | Correct | 20 ms | 1132 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |
11 | Correct | 12 ms | 1004 KB | Output is correct |
12 | Correct | 23 ms | 1260 KB | Output is correct |
13 | Correct | 15 ms | 1132 KB | Output is correct |
14 | Correct | 15 ms | 1132 KB | Output is correct |
15 | Incorrect | 32 ms | 2740 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |