# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
28442 | AcornCkiGuiziTeam (#68) | LR Springboard (FXCUP2_springboard) | C++11 | 3 ms | 1132 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "springboard.h"
#include <stdio.h>
void Reorder(int N) {
int a = PutBall((N+1)/2);
int b = PutBall((N+1)/2);
if(a == b) {
if(a == -1) PutBall(1);
return;
}
int L = (N+1) / 2, state = a;
while(L) {
int x = (L + 1) / 2;
if(state == 1) {
int t = PutBall(x);
if(t == 1) {
L = x - 1;
state = 2;
}
else {
L = L - x;
}
}
else {
int t = PutBall(N + 1 - x);
if(t == -1) {
L = x - 1;
state = 1;
}
else {
L = L - x;
}
}
}
if(state == 1) PutBall(1);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |