| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 843638 | heavylightdecomp | Choreography (IOI23_choreography) | C++17 | 1060 ms | 6360 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e5+5;
int x[maxn], y[maxn], s, t, N;
void init(int n, vector<int> p) {
N = n;
for(int i = 0; i < N; i++) {
x[i] = p[i]; // x to y
y[p[i]] = i; // y to x
}
}
int fix(int c) {
while(c >= N) { c -= N; }
while(c < 0) { c += N; }
return c;
//This code is theoretically slow, but it seems to be optimized by compiler ^^
}
void move_right(int K) {
s += K;
}
void move_left(int K) {
s -= K;
}
void swap_places() {
}
void move_around() {
swap(x,y);
swap(s,t);
}
int get_position(int D) {
/*
Careful!
x[i] represents p[i+s mod N]
x[i-s mod N] represents p[i], the intended value
same for y
*/
return fix(y[fix(D-t)] + s);
}| # | 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... | ||||
