Submission #28533

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