| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 633281 | AA_Surely | Art Collections (BOI22_art) | C++17 | 1567 ms | 628 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "art.h"
#define FOR(i, x, n) for(int i = x; i < n; i++)
#define F0R(i, n) FOR(i, 0, n)
#define ROF(i, x, n) for(int i = n - 1; i >= x; i--)
#define R0F(i, n) ROF(i, 0, n)
#define WTF cout << "WTF" << endl
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define F first
#define S second
#define PB push_back
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<PII> VPII;
typedef vector<PLL> VPLL;
const int N = 4000 + 7;
int n;
int ans[N], kp[N];
VI qry, pr;
inline int ask(int x) {
F0R(i, n) {
qry[i] = x--;
if (!x) x = n;
}
return publish(qry);
}
void solve(int nn) {
n = nn;
qry.resize(n);
FOR(i, 1, n + 1) kp[i] = ask(i);
int inv1 = kp[n];
int inv2 = kp[1];
int p = (inv1 + inv2 - n + 1) / 2;
ans[1] = inv2 - p + 1;
FOR(i, 2, n + 1) {
inv1 = inv2;
inv2 = kp[i];
p = (inv1 + inv2 - n + 1) / 2;
ans[i] = inv2 - p + 1;
}
pr.resize(n);
FOR(i, 1, n + 1) pr[ ans[i] - 1 ] = i;
answer(pr);
return;
}컴파일 시 표준 에러 (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... | ||||
