# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
109172 | tjd229 | LR Springboard (FXCUP2_springboard) | C++14 | 3 ms | 256 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"
#include <stdio.h>
void Reorder(int N) {
int rem = N;
int dir = PutBall(1+(N>>1));
while (rem>1) {
rem >>= 1;
if (dir > 0) dir = PutBall(N - rem + 1);// , printf("put %d, d=%d\n", N - rem + 1, dir);
else dir = PutBall(rem);// , printf("put %d, d=%d\n", rem, dir);
}
if (dir > 0) {
dir=PutBall(N);
if (dir < 0) PutBall(1);
}
else {
dir=PutBall(1);
if (dir < 0) PutBall(1);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |