# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
873110 | 2023-11-14T13:20:00 Z | Faisal_Saqib | Art Collections (BOI22_art) | C++17 | 80 ms | 344 KB |
#include "art.h" #include <iostream> #include <algorithm> #include <climits> #include <queue> #include <cmath> #include <map> #include <set> #include <random> #include <chrono> #include <iomanip> #include <vector> #include <fstream> using namespace std; #define vll vector<ll> #define sll set<ll> #define vstr vector<string> #define ll long long #define ld long double #define supra main #define pb push_back #define add insert #define rall(x) rbegin(x),rend(x) #define all(x) (x).begin(),(x).end() #define I ios_base::sync_with_stdio(false); #define Hear cin.tie(NULL); #define Shots cout.tie(NULL); #define Ratatatata #define bits_on(a) (__builtin_popcountll(a)) #define mx_pw2(a) (__builtin_ctzll(a)) mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count()); #define SHUFFLE(v) shuffle(all(v), RNG); void solve(int n) { vector<int> order; for(int i=1;i<=n;i++) order.pb(i); for(int i=1;i<=n;i++) { int mid=n*n; for(int j=0;j<i;j++) { vector<int> NEW(n); int p=0; int l=0; for(;p<j;l++) if(order[l]!=i) NEW[p++]=order[l]; p=j+1; for(;p<n;l++) if(order[l]!=i) NEW[p++]=order[l]; NEW[j]=i; int an=publish(NEW); if(an<=mid) { mid=an; order=NEW; } } } answer(order); return; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 5 ms | 344 KB | Output is correct |
10 | Correct | 5 ms | 344 KB | Output is correct |
11 | Correct | 6 ms | 344 KB | Output is correct |
12 | Correct | 5 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 344 KB | Output is correct |
14 | Correct | 0 ms | 344 KB | Output is correct |
15 | Correct | 0 ms | 344 KB | Output is correct |
16 | Correct | 1 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 1 ms | 344 KB | Output is correct |
19 | Correct | 5 ms | 344 KB | Output is correct |
20 | Correct | 7 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 5 ms | 344 KB | Output is correct |
10 | Correct | 5 ms | 344 KB | Output is correct |
11 | Correct | 6 ms | 344 KB | Output is correct |
12 | Correct | 5 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 344 KB | Output is correct |
14 | Correct | 0 ms | 344 KB | Output is correct |
15 | Correct | 0 ms | 344 KB | Output is correct |
16 | Correct | 1 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 1 ms | 344 KB | Output is correct |
19 | Correct | 5 ms | 344 KB | Output is correct |
20 | Correct | 7 ms | 344 KB | Output is correct |
21 | Correct | 0 ms | 344 KB | Output is correct |
22 | Correct | 6 ms | 344 KB | Output is correct |
23 | Correct | 6 ms | 344 KB | Output is correct |
24 | Correct | 6 ms | 344 KB | Output is correct |
25 | Correct | 5 ms | 344 KB | Output is correct |
26 | Incorrect | 80 ms | 344 KB | Not correct |
27 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 5 ms | 344 KB | Output is correct |
10 | Correct | 5 ms | 344 KB | Output is correct |
11 | Correct | 6 ms | 344 KB | Output is correct |
12 | Correct | 5 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 344 KB | Output is correct |
14 | Correct | 0 ms | 344 KB | Output is correct |
15 | Correct | 0 ms | 344 KB | Output is correct |
16 | Correct | 1 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 1 ms | 344 KB | Output is correct |
19 | Correct | 5 ms | 344 KB | Output is correct |
20 | Correct | 7 ms | 344 KB | Output is correct |
21 | Correct | 0 ms | 344 KB | Output is correct |
22 | Correct | 6 ms | 344 KB | Output is correct |
23 | Correct | 6 ms | 344 KB | Output is correct |
24 | Correct | 6 ms | 344 KB | Output is correct |
25 | Correct | 5 ms | 344 KB | Output is correct |
26 | Incorrect | 80 ms | 344 KB | Not correct |
27 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 5 ms | 344 KB | Output is correct |
10 | Correct | 5 ms | 344 KB | Output is correct |
11 | Correct | 6 ms | 344 KB | Output is correct |
12 | Correct | 5 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 344 KB | Output is correct |
14 | Correct | 0 ms | 344 KB | Output is correct |
15 | Correct | 0 ms | 344 KB | Output is correct |
16 | Correct | 1 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 1 ms | 344 KB | Output is correct |
19 | Correct | 5 ms | 344 KB | Output is correct |
20 | Correct | 7 ms | 344 KB | Output is correct |
21 | Correct | 0 ms | 344 KB | Output is correct |
22 | Correct | 6 ms | 344 KB | Output is correct |
23 | Correct | 6 ms | 344 KB | Output is correct |
24 | Correct | 6 ms | 344 KB | Output is correct |
25 | Correct | 5 ms | 344 KB | Output is correct |
26 | Incorrect | 80 ms | 344 KB | Not correct |
27 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 0 ms | 344 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 1 ms | 344 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 5 ms | 344 KB | Output is correct |
10 | Correct | 5 ms | 344 KB | Output is correct |
11 | Correct | 6 ms | 344 KB | Output is correct |
12 | Correct | 5 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 344 KB | Output is correct |
14 | Correct | 0 ms | 344 KB | Output is correct |
15 | Correct | 0 ms | 344 KB | Output is correct |
16 | Correct | 1 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 1 ms | 344 KB | Output is correct |
19 | Correct | 5 ms | 344 KB | Output is correct |
20 | Correct | 7 ms | 344 KB | Output is correct |
21 | Correct | 0 ms | 344 KB | Output is correct |
22 | Correct | 6 ms | 344 KB | Output is correct |
23 | Correct | 6 ms | 344 KB | Output is correct |
24 | Correct | 6 ms | 344 KB | Output is correct |
25 | Correct | 5 ms | 344 KB | Output is correct |
26 | Incorrect | 80 ms | 344 KB | Not correct |
27 | Halted | 0 ms | 0 KB | - |