# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
807693 | 2023-08-04T21:36:05 Z | Juan | Art Collections (BOI22_art) | C++17 | 1 ms | 208 KB |
#include<bits/stdc++.h> #include "art.h" using namespace std; int ask(int x, int n){ vector<int> v; v.push_back(x); for(int i = 1; i <= n; i++) if(i!=x) v.push_back(i); publish(v); cout << endl; int rt; cin >> rt; return rt; } void insrt(vector<int> &v, int x, int p){ vector<int> aux; for(int i = 0; i < p; i++) aux.push_back(v[i]); aux.push_back(x); for(int i = p; i < v.size(); i++) aux.push_back(v[i]); swap(v, aux); } void solve(int n){ vector<int> ans; int B = ask(1, n); ans.push_back(1); for(int i = 2; i <= n; i++){ // int x = ask(i); // int antes = (i-1-B+x)/2; // insrt(ans, i, antes); insrt(ans, i, (i-1-B+ask(i,n))/2); } answer(ans); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |