# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
574572 | cheissmart | Art Collections (BOI22_art) | C++17 | 1508 ms | 664 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "art.h"
#include <bits/stdc++.h>
#define IO_OP ios::sync_with_stdio(0), cin.tie(0)
#define F first
#define S second
#define V vector
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define SZ(v) (v).size()
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef V<int> vi;
const int INF = 1e9 + 7;
void solve(int n) {
vi aux;
for(int i = 0; i < n; i++) {
vi p(n); iota(ALL(p), 1);
p.erase(p.begin() + i);
p.insert(p.begin(), i + 1);
aux.PB(publish(p));
}
int tt = aux[0];
for(int i = 0; i < n; i++) {
assert((aux[i] - tt + i) % 2 == 0);
aux[i] = (aux[i] - tt + i) / 2;
}
vi s(n); iota(ALL(s), 0);
vi ans;
for(int i = n - 1; i >= 0; i--) {
ans.PB(s[aux[i]]);
s.erase(s.begin() + aux[i]);
}
reverse(ALL(ans));
vi res(n);
for(int i = 0; i < n; i++)
res[ans[i]] = i + 1;
answer(res);
}
컴파일 시 표준 에러 (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... |