Submission #28516

#TimeUsernameProblemLanguageResultExecution timeMemory
28516점수판에 아이디와 팀명이 같이 표기되니, 신중하게 적어주세요. (#68)LR Springboard (FXCUP2_springboard)C++14
0 / 1
0 ms1128 KiB
#include "springboard.h" void Reorder(int N) { bool dir = false; int n = N; while (n) { int a; bool pdir = dir; if (dir) a = n / 2; else a = (N+1) - (n / 2); if (PutBall(a) == 1) dir = false; else dir = true; if (dir != pdir) n = (n / 2) - 1; else n = n - (n / 2) - 1; } if (dir) PutBall(1); }
#Verdict Execution timeMemoryGrader output
Fetching results...