# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
522846 | 2022-02-06T03:51:22 Z | OJtester | The Collection Game (BOI21_swaps) | C++17 | 59 ms | 536 KB |
//Forwarded from QOJ19590 #include "swaps.h" #include <bits/stdc++.h> #define pi pair<int,int> #define mk make_pair #define rep(i, a) for(register int i=1,i##end=a;i<=i##end;i++) using namespace std; void solve(int n, int D) { vector<int>ans;ans.resize(n); rep(i,n)ans[i-1]=i; for (int i=0;i<500;i++) { vector<pi>A; for(int j=i%2;j+1<ans.size();j+=2) { schedule(ans[j],ans[j+1]); A.push_back(mk(j,j+1)); } if(!A.empty()){ auto res=visit(); for(int j=0;j<A.size();j++) if(!res[j])swap(ans[A[j].first],ans[A[j].second]); } } answer(ans);return; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 200 KB | Correct |
2 | Correct | 13 ms | 280 KB | Correct |
3 | Correct | 35 ms | 200 KB | Correct |
4 | Correct | 44 ms | 296 KB | Correct |
5 | Correct | 43 ms | 300 KB | Correct |
6 | Correct | 48 ms | 280 KB | Correct |
7 | Correct | 48 ms | 420 KB | Correct |
8 | Correct | 46 ms | 400 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 200 KB | Correct |
2 | Correct | 16 ms | 200 KB | Correct |
3 | Correct | 24 ms | 200 KB | Correct |
4 | Correct | 47 ms | 324 KB | Correct |
5 | Correct | 58 ms | 300 KB | Correct |
6 | Correct | 41 ms | 300 KB | Correct |
7 | Correct | 44 ms | 296 KB | Correct |
8 | Correct | 59 ms | 496 KB | Correct |
9 | Correct | 46 ms | 300 KB | Correct |
10 | Correct | 42 ms | 296 KB | Correct |
11 | Correct | 44 ms | 296 KB | Correct |
12 | Correct | 48 ms | 400 KB | Correct |
13 | Correct | 39 ms | 300 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 200 KB | Correct |
2 | Correct | 15 ms | 272 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 200 KB | Correct |
2 | Correct | 15 ms | 272 KB | Correct |
3 | Correct | 5 ms | 200 KB | Correct |
4 | Correct | 13 ms | 200 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 200 KB | Correct |
2 | Correct | 17 ms | 320 KB | Correct |
3 | Correct | 25 ms | 200 KB | Correct |
4 | Correct | 48 ms | 300 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 200 KB | Correct |
2 | Correct | 17 ms | 320 KB | Correct |
3 | Correct | 25 ms | 200 KB | Correct |
4 | Correct | 48 ms | 300 KB | Correct |
5 | Correct | 5 ms | 200 KB | Correct |
6 | Correct | 21 ms | 272 KB | Correct |
7 | Correct | 27 ms | 200 KB | Correct |
8 | Correct | 43 ms | 352 KB | Correct |
9 | Correct | 46 ms | 296 KB | Correct |
10 | Correct | 41 ms | 428 KB | Correct |
11 | Correct | 45 ms | 536 KB | Correct |
12 | Correct | 46 ms | 300 KB | Correct |
13 | Correct | 6 ms | 268 KB | Correct |
14 | Correct | 16 ms | 200 KB | Correct |
15 | Correct | 29 ms | 200 KB | Correct |
16 | Correct | 45 ms | 404 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 200 KB | Correct |
2 | Correct | 17 ms | 284 KB | Correct |
3 | Correct | 24 ms | 200 KB | Correct |
4 | Correct | 58 ms | 296 KB | Correct |
5 | Correct | 43 ms | 364 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 200 KB | Correct |
2 | Correct | 17 ms | 284 KB | Correct |
3 | Correct | 24 ms | 200 KB | Correct |
4 | Correct | 58 ms | 296 KB | Correct |
5 | Correct | 43 ms | 364 KB | Correct |
6 | Correct | 6 ms | 200 KB | Correct |
7 | Correct | 9 ms | 328 KB | Correct |
8 | Correct | 21 ms | 200 KB | Correct |
9 | Correct | 53 ms | 296 KB | Correct |
10 | Correct | 43 ms | 380 KB | Correct |
11 | Correct | 57 ms | 300 KB | Correct |
12 | Correct | 45 ms | 300 KB | Correct |
13 | Correct | 51 ms | 404 KB | Correct |
14 | Correct | 42 ms | 296 KB | Correct |
15 | Correct | 52 ms | 304 KB | Correct |
16 | Correct | 59 ms | 372 KB | Correct |
17 | Correct | 41 ms | 300 KB | Correct |
18 | Correct | 43 ms | 300 KB | Correct |
19 | Correct | 6 ms | 200 KB | Correct |
20 | Correct | 15 ms | 272 KB | Correct |
21 | Correct | 28 ms | 200 KB | Correct |
22 | Correct | 43 ms | 304 KB | Correct |
23 | Correct | 57 ms | 392 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 200 KB | Correct |
2 | Correct | 20 ms | 268 KB | Correct |
3 | Correct | 35 ms | 200 KB | Correct |
4 | Correct | 55 ms | 300 KB | Correct |
5 | Correct | 46 ms | 300 KB | Correct |
6 | Runtime error | 14 ms | 320 KB | Execution killed with signal 11 |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 200 KB | Correct |
2 | Correct | 20 ms | 268 KB | Correct |
3 | Correct | 35 ms | 200 KB | Correct |
4 | Correct | 55 ms | 300 KB | Correct |
5 | Correct | 46 ms | 300 KB | Correct |
6 | Runtime error | 14 ms | 320 KB | Execution killed with signal 11 |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 284 KB | Correct |
2 | Correct | 13 ms | 200 KB | Correct |
3 | Correct | 28 ms | 200 KB | Correct |
4 | Correct | 59 ms | 396 KB | Correct |
5 | Correct | 42 ms | 276 KB | Correct |
6 | Runtime error | 10 ms | 428 KB | Execution killed with signal 11 |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 284 KB | Correct |
2 | Correct | 13 ms | 200 KB | Correct |
3 | Correct | 28 ms | 200 KB | Correct |
4 | Correct | 59 ms | 396 KB | Correct |
5 | Correct | 42 ms | 276 KB | Correct |
6 | Runtime error | 10 ms | 428 KB | Execution killed with signal 11 |
7 | Halted | 0 ms | 0 KB | - |