# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
28560 | Official Fan of ACG (#68) | LR Springboard (FXCUP2_springboard) | C++14 | 0 ms | 1132 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 == 2){
flip = PutBall(1);
if (flip == -1) flip = PutBall(1);
if (flip == -1) flip = 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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |