# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
714446 | 2023-03-24T12:51:12 Z | vjudge1 | Art Collections (BOI22_art) | C++17 | 180 ms | 208 KB |
#include "art.h" #include "bits/stdc++.h" #define intt long long #define pb push_back #define endl '\n' #define F first #define S second #define pii pair<int,int> #define pll pair<intt,intt> #define ld long double #define fast_io ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; const int sz = 2e5+5; int inv; int n; bool cmp(int i, int j) { vector<int>v; for ( int k = 1; k <= n; k++ ) if(k != i and k != j) v.pb(k); v.pb(i);v.pb(j); int inv1 = publish(v); v.pop_back();v.pop_back(); v.pb(j);v.pb(i); int inv2 = publish(v); return inv1 < inv2; } void solve(int N) { n = N; vector<int>res; for ( int i = 1; i <= n; i++ ) res.pb(i); stable_sort(res.begin(),res.end(), cmp); answer(res); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 5 ms | 208 KB | Output is correct |
10 | Correct | 5 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 5 ms | 208 KB | Output is correct |
13 | Correct | 1 ms | 208 KB | Output is correct |
14 | Correct | 1 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 | 0 ms | 208 KB | Output is correct |
19 | Correct | 5 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 5 ms | 208 KB | Output is correct |
10 | Correct | 5 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 5 ms | 208 KB | Output is correct |
13 | Correct | 1 ms | 208 KB | Output is correct |
14 | Correct | 1 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 | 0 ms | 208 KB | Output is correct |
19 | Correct | 5 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 1 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 5 ms | 208 KB | Output is correct |
24 | Correct | 5 ms | 208 KB | Output is correct |
25 | Correct | 6 ms | 208 KB | Output is correct |
26 | Correct | 79 ms | 208 KB | Output is correct |
27 | Correct | 49 ms | 208 KB | Output is correct |
28 | Correct | 123 ms | 208 KB | Output is correct |
29 | Correct | 104 ms | 208 KB | Output is correct |
30 | Correct | 154 ms | 208 KB | Output is correct |
31 | Correct | 118 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 1 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 | 5 ms | 208 KB | Output is correct |
39 | Correct | 2 ms | 208 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 5 ms | 208 KB | Output is correct |
10 | Correct | 5 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 5 ms | 208 KB | Output is correct |
13 | Correct | 1 ms | 208 KB | Output is correct |
14 | Correct | 1 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 | 0 ms | 208 KB | Output is correct |
19 | Correct | 5 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 1 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 5 ms | 208 KB | Output is correct |
24 | Correct | 5 ms | 208 KB | Output is correct |
25 | Correct | 6 ms | 208 KB | Output is correct |
26 | Correct | 79 ms | 208 KB | Output is correct |
27 | Correct | 49 ms | 208 KB | Output is correct |
28 | Correct | 123 ms | 208 KB | Output is correct |
29 | Correct | 104 ms | 208 KB | Output is correct |
30 | Correct | 154 ms | 208 KB | Output is correct |
31 | Correct | 118 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 1 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 | 5 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 | 7 ms | 208 KB | Output is correct |
43 | Correct | 5 ms | 208 KB | Output is correct |
44 | Correct | 7 ms | 208 KB | Output is correct |
45 | Correct | 81 ms | 208 KB | Output is correct |
46 | Correct | 52 ms | 208 KB | Output is correct |
47 | Correct | 131 ms | 208 KB | Output is correct |
48 | Correct | 118 ms | 208 KB | Output is correct |
49 | Correct | 112 ms | 208 KB | Output is correct |
50 | Correct | 114 ms | 208 KB | Output is correct |
51 | Correct | 1 ms | 208 KB | Output is correct |
52 | Incorrect | 180 ms | 208 KB | Not correct |
53 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 5 ms | 208 KB | Output is correct |
10 | Correct | 5 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 5 ms | 208 KB | Output is correct |
13 | Correct | 1 ms | 208 KB | Output is correct |
14 | Correct | 1 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 | 0 ms | 208 KB | Output is correct |
19 | Correct | 5 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 1 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 5 ms | 208 KB | Output is correct |
24 | Correct | 5 ms | 208 KB | Output is correct |
25 | Correct | 6 ms | 208 KB | Output is correct |
26 | Correct | 79 ms | 208 KB | Output is correct |
27 | Correct | 49 ms | 208 KB | Output is correct |
28 | Correct | 123 ms | 208 KB | Output is correct |
29 | Correct | 104 ms | 208 KB | Output is correct |
30 | Correct | 154 ms | 208 KB | Output is correct |
31 | Correct | 118 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 1 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 | 5 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 | 7 ms | 208 KB | Output is correct |
43 | Correct | 5 ms | 208 KB | Output is correct |
44 | Correct | 7 ms | 208 KB | Output is correct |
45 | Correct | 81 ms | 208 KB | Output is correct |
46 | Correct | 52 ms | 208 KB | Output is correct |
47 | Correct | 131 ms | 208 KB | Output is correct |
48 | Correct | 118 ms | 208 KB | Output is correct |
49 | Correct | 112 ms | 208 KB | Output is correct |
50 | Correct | 114 ms | 208 KB | Output is correct |
51 | Correct | 1 ms | 208 KB | Output is correct |
52 | Incorrect | 180 ms | 208 KB | Not correct |
53 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 5 ms | 208 KB | Output is correct |
10 | Correct | 5 ms | 208 KB | Output is correct |
11 | Correct | 5 ms | 208 KB | Output is correct |
12 | Correct | 5 ms | 208 KB | Output is correct |
13 | Correct | 1 ms | 208 KB | Output is correct |
14 | Correct | 1 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 | 0 ms | 208 KB | Output is correct |
19 | Correct | 5 ms | 208 KB | Output is correct |
20 | Correct | 2 ms | 208 KB | Output is correct |
21 | Correct | 1 ms | 208 KB | Output is correct |
22 | Correct | 5 ms | 208 KB | Output is correct |
23 | Correct | 5 ms | 208 KB | Output is correct |
24 | Correct | 5 ms | 208 KB | Output is correct |
25 | Correct | 6 ms | 208 KB | Output is correct |
26 | Correct | 79 ms | 208 KB | Output is correct |
27 | Correct | 49 ms | 208 KB | Output is correct |
28 | Correct | 123 ms | 208 KB | Output is correct |
29 | Correct | 104 ms | 208 KB | Output is correct |
30 | Correct | 154 ms | 208 KB | Output is correct |
31 | Correct | 118 ms | 208 KB | Output is correct |
32 | Correct | 1 ms | 208 KB | Output is correct |
33 | Correct | 1 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 | 5 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 | 7 ms | 208 KB | Output is correct |
43 | Correct | 5 ms | 208 KB | Output is correct |
44 | Correct | 7 ms | 208 KB | Output is correct |
45 | Correct | 81 ms | 208 KB | Output is correct |
46 | Correct | 52 ms | 208 KB | Output is correct |
47 | Correct | 131 ms | 208 KB | Output is correct |
48 | Correct | 118 ms | 208 KB | Output is correct |
49 | Correct | 112 ms | 208 KB | Output is correct |
50 | Correct | 114 ms | 208 KB | Output is correct |
51 | Correct | 1 ms | 208 KB | Output is correct |
52 | Incorrect | 180 ms | 208 KB | Not correct |
53 | Halted | 0 ms | 0 KB | - |