Submission #28667

# Submission time Handle Problem Language Result Execution time Memory
28667 2017-07-16T08:33:35 Z 일단아무거나적어놓은팀이름(#1191, solarmagic, junodeveloper) LR Springboard (FXCUP2_springboard) C++14
0 / 1
0 ms 1128 KB
#include "springboard.h"
int rightmost = -1;
void solve(int l, int r) {
    if(l > r) return;
    int mid = (l + r) >> 1;
    int q = PutBall(mid);
    if(q == 1) solve(l, mid - 1);
    else {
        if(rightmost < mid)
            rightmost = mid;
        solve(mid + 1, r);
    }
}
void Reorder(int N) {
    solve(1, N);
    if(rightmost != -1) PutBall(rightmost);
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1128 KB Output isn't correct
2 Halted 0 ms 0 KB -