| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 28442 | AcornCkiGuiziTeam (#68) | LR Springboard (FXCUP2_springboard) | C++11 | 3 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"
#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... | ||||
