# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
714226 | 2023-03-24T06:45:12 Z | vjudge1 | Art Collections (BOI22_art) | C++17 | 182 ms | 208 KB |
#include "art.h" #include<bits/stdc++.h> using namespace std; int N; vector<int> v; bool f(int a, int b){ int first = publish(v); swap(v[a - 1], v[b - 1]); int second = publish(v); swap(v[a - 1], v[b - 1]); return first > second; } void solve(int n) { N = n; vector<int> order(n); for (int i = 0; i < n; i++) order[i] = i + 1, v.push_back(i + 1); stable_sort(order.begin(), order.end(), f); answer(order); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 208 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
5 | Correct | 1 ms | 208 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 1 ms | 208 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 208 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
5 | Correct | 1 ms | 208 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 1 ms | 208 KB | Output is correct |
8 | Correct | 1 ms | 208 KB | Output is correct |
9 | Correct | 6 ms | 208 KB | Output is correct |
10 | Correct | 6 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 6 ms | 208 KB | Output is correct |
13 | Correct | 2 ms | 208 KB | Output is correct |
14 | Correct | 0 ms | 208 KB | Output is correct |
15 | Correct | 1 ms | 208 KB | Output is correct |
16 | Correct | 1 ms | 208 KB | Output is correct |
17 | Correct | 1 ms | 208 KB | Output is correct |
18 | Correct | 1 ms | 208 KB | Output is correct |
19 | Correct | 2 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 208 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
5 | Correct | 1 ms | 208 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 1 ms | 208 KB | Output is correct |
8 | Correct | 1 ms | 208 KB | Output is correct |
9 | Correct | 6 ms | 208 KB | Output is correct |
10 | Correct | 6 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 6 ms | 208 KB | Output is correct |
13 | Correct | 2 ms | 208 KB | Output is correct |
14 | Correct | 0 ms | 208 KB | Output is correct |
15 | Correct | 1 ms | 208 KB | Output is correct |
16 | Correct | 1 ms | 208 KB | Output is correct |
17 | Correct | 1 ms | 208 KB | Output is correct |
18 | Correct | 1 ms | 208 KB | Output is correct |
19 | Correct | 2 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 0 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 3 ms | 208 KB | Output is correct |
24 | Correct | 7 ms | 208 KB | Output is correct |
25 | Correct | 5 ms | 208 KB | Output is correct |
26 | Correct | 89 ms | 208 KB | Output is correct |
27 | Correct | 50 ms | 208 KB | Output is correct |
28 | Correct | 125 ms | 208 KB | Output is correct |
29 | Correct | 123 ms | 208 KB | Output is correct |
30 | Correct | 96 ms | 208 KB | Output is correct |
31 | Correct | 108 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 0 ms | 208 KB | Output is correct |
34 | Correct | 1 ms | 208 KB | Output is correct |
35 | Correct | 1 ms | 208 KB | Output is correct |
36 | Correct | 1 ms | 208 KB | Output is correct |
37 | Correct | 1 ms | 208 KB | Output is correct |
38 | Correct | 4 ms | 208 KB | Output is correct |
39 | Correct | 2 ms | 208 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 208 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
5 | Correct | 1 ms | 208 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 1 ms | 208 KB | Output is correct |
8 | Correct | 1 ms | 208 KB | Output is correct |
9 | Correct | 6 ms | 208 KB | Output is correct |
10 | Correct | 6 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 6 ms | 208 KB | Output is correct |
13 | Correct | 2 ms | 208 KB | Output is correct |
14 | Correct | 0 ms | 208 KB | Output is correct |
15 | Correct | 1 ms | 208 KB | Output is correct |
16 | Correct | 1 ms | 208 KB | Output is correct |
17 | Correct | 1 ms | 208 KB | Output is correct |
18 | Correct | 1 ms | 208 KB | Output is correct |
19 | Correct | 2 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 0 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 3 ms | 208 KB | Output is correct |
24 | Correct | 7 ms | 208 KB | Output is correct |
25 | Correct | 5 ms | 208 KB | Output is correct |
26 | Correct | 89 ms | 208 KB | Output is correct |
27 | Correct | 50 ms | 208 KB | Output is correct |
28 | Correct | 125 ms | 208 KB | Output is correct |
29 | Correct | 123 ms | 208 KB | Output is correct |
30 | Correct | 96 ms | 208 KB | Output is correct |
31 | Correct | 108 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 0 ms | 208 KB | Output is correct |
34 | Correct | 1 ms | 208 KB | Output is correct |
35 | Correct | 1 ms | 208 KB | Output is correct |
36 | Correct | 1 ms | 208 KB | Output is correct |
37 | Correct | 1 ms | 208 KB | Output is correct |
38 | Correct | 4 ms | 208 KB | Output is correct |
39 | Correct | 2 ms | 208 KB | Output is correct |
40 | Correct | 1 ms | 208 KB | Output is correct |
41 | Correct | 6 ms | 208 KB | Output is correct |
42 | Correct | 5 ms | 208 KB | Output is correct |
43 | Correct | 4 ms | 208 KB | Output is correct |
44 | Correct | 5 ms | 208 KB | Output is correct |
45 | Correct | 73 ms | 208 KB | Output is correct |
46 | Correct | 53 ms | 208 KB | Output is correct |
47 | Correct | 110 ms | 208 KB | Output is correct |
48 | Correct | 116 ms | 208 KB | Output is correct |
49 | Correct | 118 ms | 208 KB | Output is correct |
50 | Correct | 120 ms | 208 KB | Output is correct |
51 | Correct | 0 ms | 208 KB | Output is correct |
52 | Incorrect | 182 ms | 208 KB | Not correct |
53 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 208 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
5 | Correct | 1 ms | 208 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 1 ms | 208 KB | Output is correct |
8 | Correct | 1 ms | 208 KB | Output is correct |
9 | Correct | 6 ms | 208 KB | Output is correct |
10 | Correct | 6 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 6 ms | 208 KB | Output is correct |
13 | Correct | 2 ms | 208 KB | Output is correct |
14 | Correct | 0 ms | 208 KB | Output is correct |
15 | Correct | 1 ms | 208 KB | Output is correct |
16 | Correct | 1 ms | 208 KB | Output is correct |
17 | Correct | 1 ms | 208 KB | Output is correct |
18 | Correct | 1 ms | 208 KB | Output is correct |
19 | Correct | 2 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 0 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 3 ms | 208 KB | Output is correct |
24 | Correct | 7 ms | 208 KB | Output is correct |
25 | Correct | 5 ms | 208 KB | Output is correct |
26 | Correct | 89 ms | 208 KB | Output is correct |
27 | Correct | 50 ms | 208 KB | Output is correct |
28 | Correct | 125 ms | 208 KB | Output is correct |
29 | Correct | 123 ms | 208 KB | Output is correct |
30 | Correct | 96 ms | 208 KB | Output is correct |
31 | Correct | 108 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 0 ms | 208 KB | Output is correct |
34 | Correct | 1 ms | 208 KB | Output is correct |
35 | Correct | 1 ms | 208 KB | Output is correct |
36 | Correct | 1 ms | 208 KB | Output is correct |
37 | Correct | 1 ms | 208 KB | Output is correct |
38 | Correct | 4 ms | 208 KB | Output is correct |
39 | Correct | 2 ms | 208 KB | Output is correct |
40 | Correct | 1 ms | 208 KB | Output is correct |
41 | Correct | 6 ms | 208 KB | Output is correct |
42 | Correct | 5 ms | 208 KB | Output is correct |
43 | Correct | 4 ms | 208 KB | Output is correct |
44 | Correct | 5 ms | 208 KB | Output is correct |
45 | Correct | 73 ms | 208 KB | Output is correct |
46 | Correct | 53 ms | 208 KB | Output is correct |
47 | Correct | 110 ms | 208 KB | Output is correct |
48 | Correct | 116 ms | 208 KB | Output is correct |
49 | Correct | 118 ms | 208 KB | Output is correct |
50 | Correct | 120 ms | 208 KB | Output is correct |
51 | Correct | 0 ms | 208 KB | Output is correct |
52 | Incorrect | 182 ms | 208 KB | Not correct |
53 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Output is correct |
2 | Correct | 1 ms | 208 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
5 | Correct | 1 ms | 208 KB | Output is correct |
6 | Correct | 1 ms | 208 KB | Output is correct |
7 | Correct | 1 ms | 208 KB | Output is correct |
8 | Correct | 1 ms | 208 KB | Output is correct |
9 | Correct | 6 ms | 208 KB | Output is correct |
10 | Correct | 6 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 6 ms | 208 KB | Output is correct |
13 | Correct | 2 ms | 208 KB | Output is correct |
14 | Correct | 0 ms | 208 KB | Output is correct |
15 | Correct | 1 ms | 208 KB | Output is correct |
16 | Correct | 1 ms | 208 KB | Output is correct |
17 | Correct | 1 ms | 208 KB | Output is correct |
18 | Correct | 1 ms | 208 KB | Output is correct |
19 | Correct | 2 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 0 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 3 ms | 208 KB | Output is correct |
24 | Correct | 7 ms | 208 KB | Output is correct |
25 | Correct | 5 ms | 208 KB | Output is correct |
26 | Correct | 89 ms | 208 KB | Output is correct |
27 | Correct | 50 ms | 208 KB | Output is correct |
28 | Correct | 125 ms | 208 KB | Output is correct |
29 | Correct | 123 ms | 208 KB | Output is correct |
30 | Correct | 96 ms | 208 KB | Output is correct |
31 | Correct | 108 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 0 ms | 208 KB | Output is correct |
34 | Correct | 1 ms | 208 KB | Output is correct |
35 | Correct | 1 ms | 208 KB | Output is correct |
36 | Correct | 1 ms | 208 KB | Output is correct |
37 | Correct | 1 ms | 208 KB | Output is correct |
38 | Correct | 4 ms | 208 KB | Output is correct |
39 | Correct | 2 ms | 208 KB | Output is correct |
40 | Correct | 1 ms | 208 KB | Output is correct |
41 | Correct | 6 ms | 208 KB | Output is correct |
42 | Correct | 5 ms | 208 KB | Output is correct |
43 | Correct | 4 ms | 208 KB | Output is correct |
44 | Correct | 5 ms | 208 KB | Output is correct |
45 | Correct | 73 ms | 208 KB | Output is correct |
46 | Correct | 53 ms | 208 KB | Output is correct |
47 | Correct | 110 ms | 208 KB | Output is correct |
48 | Correct | 116 ms | 208 KB | Output is correct |
49 | Correct | 118 ms | 208 KB | Output is correct |
50 | Correct | 120 ms | 208 KB | Output is correct |
51 | Correct | 0 ms | 208 KB | Output is correct |
52 | Incorrect | 182 ms | 208 KB | Not correct |
53 | Halted | 0 ms | 0 KB | - |