Submission #28657

#TimeUsernameProblemLanguageResultExecution timeMemory
28657일단아무거나적어놓은팀이름 (#68)LR Springboard (FXCUP2_springboard)C++14
0 / 1
0 ms1128 KiB
#include "springboard.h" int rightmost = -1; void solve(int l, int r) { 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 timeMemoryGrader output
Fetching results...