# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
685046 | oblantis | Art Collections (BOI22_art) | C++17 | 1606 ms | 696 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "art.h"
#define all(v) v.begin(), v.end()
#define pb push_back
#define ss second
#define ff first
#define vt vector
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int inf = 2e9;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 12;
int publish(vi v);
void answer(vi v);
void solve(int n) {
vi out;
int x, y = inf;
for(int i = n; i >= 1; i--) {
vi t;
for(int j = 1; j < i; j++) {
if(i != j)t.pb(j);
}
for(int j = 0; i + j < n; j++)t.pb(out[j]);
t.pb(i);
x = publish(t);
if(i == n)out.pb(i), y = x;
else {
int z = (y - x + (n - i)) / 2;
out.insert(out.begin() + z, i);
y -= z;
}
}
answer(out);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |