# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
947048 | 2024-03-15T12:40:23 Z | onepunchac168 | Minerals (JOI19_minerals) | C++14 | 101 ms | 3240 KB |
#include "minerals.h" #include <bits/stdc++.h> using namespace std; int query(int x) { return Query(x); } void solve(vector <int> need,bool check) { cerr<<1<<endl; if (need.size()==2) { if (check==1) { int aa=query(need[0]); int bb=query(need[1]); } Answer(need[0],need[1]); return; } if (need.size()<=1) { assert(1==0); } vector <int> aa,bb; int rr=need.size()/4; if (check==0) { for (int i=0;i<need.size();i++) { int a1=query(need[i]); //cout<<a1<<'\n'; if (a1<=rr) { aa.push_back(need[i]); } else { int a2=query(need[i]); bb.push_back(need[i]); } } solve(aa,1); solve(bb,0); } else { for (int i=rr;i<need.size();i++) { int a1=query(need[i]); } for (int i=0;i<rr;i++) { aa.push_back(need[i]); } for (int i=rr;i<need.size();i++) { int a1=query(need[i]); if (a1<=rr) { aa.push_back(need[i]); } else { int a2=query(need[i]); bb.push_back(need[i]); } } solve(aa,1); solve(bb,0); } } void Solve(int n) { vector <int > opt; for (int i=1;i<=2*n;i++) { opt.push_back(i); } solve(opt,0); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 344 KB | Output is correct |
2 | Correct | 10 ms | 344 KB | Output is correct |
3 | Correct | 20 ms | 600 KB | Output is correct |
4 | Correct | 42 ms | 856 KB | Output is correct |
5 | Correct | 76 ms | 1324 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Correct | 10 ms | 344 KB | Output is correct |
7 | Correct | 20 ms | 600 KB | Output is correct |
8 | Correct | 42 ms | 856 KB | Output is correct |
9 | Correct | 76 ms | 1324 KB | Output is correct |
10 | Correct | 5 ms | 520 KB | Output is correct |
11 | Correct | 59 ms | 1120 KB | Output is correct |
12 | Correct | 87 ms | 1548 KB | Output is correct |
13 | Correct | 74 ms | 1624 KB | Output is correct |
14 | Correct | 75 ms | 1516 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Correct | 10 ms | 344 KB | Output is correct |
7 | Correct | 20 ms | 600 KB | Output is correct |
8 | Correct | 42 ms | 856 KB | Output is correct |
9 | Correct | 76 ms | 1324 KB | Output is correct |
10 | Correct | 5 ms | 520 KB | Output is correct |
11 | Correct | 59 ms | 1120 KB | Output is correct |
12 | Correct | 87 ms | 1548 KB | Output is correct |
13 | Correct | 74 ms | 1624 KB | Output is correct |
14 | Correct | 75 ms | 1516 KB | Output is correct |
15 | Incorrect | 101 ms | 3240 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Correct | 10 ms | 344 KB | Output is correct |
7 | Correct | 20 ms | 600 KB | Output is correct |
8 | Correct | 42 ms | 856 KB | Output is correct |
9 | Correct | 76 ms | 1324 KB | Output is correct |
10 | Correct | 5 ms | 520 KB | Output is correct |
11 | Correct | 59 ms | 1120 KB | Output is correct |
12 | Correct | 87 ms | 1548 KB | Output is correct |
13 | Correct | 74 ms | 1624 KB | Output is correct |
14 | Correct | 75 ms | 1516 KB | Output is correct |
15 | Incorrect | 101 ms | 3240 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Correct | 10 ms | 344 KB | Output is correct |
7 | Correct | 20 ms | 600 KB | Output is correct |
8 | Correct | 42 ms | 856 KB | Output is correct |
9 | Correct | 76 ms | 1324 KB | Output is correct |
10 | Correct | 5 ms | 520 KB | Output is correct |
11 | Correct | 59 ms | 1120 KB | Output is correct |
12 | Correct | 87 ms | 1548 KB | Output is correct |
13 | Correct | 74 ms | 1624 KB | Output is correct |
14 | Correct | 75 ms | 1516 KB | Output is correct |
15 | Incorrect | 101 ms | 3240 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Correct | 10 ms | 344 KB | Output is correct |
7 | Correct | 20 ms | 600 KB | Output is correct |
8 | Correct | 42 ms | 856 KB | Output is correct |
9 | Correct | 76 ms | 1324 KB | Output is correct |
10 | Correct | 5 ms | 520 KB | Output is correct |
11 | Correct | 59 ms | 1120 KB | Output is correct |
12 | Correct | 87 ms | 1548 KB | Output is correct |
13 | Correct | 74 ms | 1624 KB | Output is correct |
14 | Correct | 75 ms | 1516 KB | Output is correct |
15 | Incorrect | 101 ms | 3240 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Correct | 10 ms | 344 KB | Output is correct |
7 | Correct | 20 ms | 600 KB | Output is correct |
8 | Correct | 42 ms | 856 KB | Output is correct |
9 | Correct | 76 ms | 1324 KB | Output is correct |
10 | Correct | 5 ms | 520 KB | Output is correct |
11 | Correct | 59 ms | 1120 KB | Output is correct |
12 | Correct | 87 ms | 1548 KB | Output is correct |
13 | Correct | 74 ms | 1624 KB | Output is correct |
14 | Correct | 75 ms | 1516 KB | Output is correct |
15 | Incorrect | 101 ms | 3240 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Correct | 10 ms | 344 KB | Output is correct |
7 | Correct | 20 ms | 600 KB | Output is correct |
8 | Correct | 42 ms | 856 KB | Output is correct |
9 | Correct | 76 ms | 1324 KB | Output is correct |
10 | Correct | 5 ms | 520 KB | Output is correct |
11 | Correct | 59 ms | 1120 KB | Output is correct |
12 | Correct | 87 ms | 1548 KB | Output is correct |
13 | Correct | 74 ms | 1624 KB | Output is correct |
14 | Correct | 75 ms | 1516 KB | Output is correct |
15 | Incorrect | 101 ms | 3240 KB | Wrong Answer [2] |
16 | Halted | 0 ms | 0 KB | - |