# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
28555 | 2017-07-16T07:17:50 Z | Official Fan of ACG(#1221, cseteram, 16silver, pps789) | LR Springboard (FXCUP2_springboard) | C++14 | 0 ms | 1128 KB |
#include "springboard.h" void Reorder(int N) { int x, p, flip; if (N == 1){ flip = PutBall(1); if (flip == -1) PutBall(1); } else if (N == 3){ flip = PutBall(1); if (flip == -1) flip = PutBall(1); if (flip == -1) flip = PutBall(1); if (flip == -1) flip = PutBall(1); } else{ flip = PutBall(N / 2); p = N / 2; while (p > 0){ if (flip == 1) flip = PutBall(N - p); else flip = PutBall(p); p /= 2; } if (flip == -1) PutBall(1); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 1128 KB | Output is correct |
2 | Correct | 0 ms | 1128 KB | Output is correct |
3 | Incorrect | 0 ms | 1128 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |