Submission #28516

# Submission time Handle Problem Language Result Execution time Memory
28516 2017-07-16T06:52:18 Z 점수판에 아이디와 팀명이 같이 표기되니, 신중하게 적어주세요.(#1186, kajebiii, secsegy, woqja125) LR Springboard (FXCUP2_springboard) C++14
0 / 1
0 ms 1128 KB
#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 time Memory Grader output
1 Incorrect 0 ms 1128 KB Output isn't correct
2 Halted 0 ms 0 KB -