Submission #28518

# Submission time Handle Problem Language Result Execution time Memory
28518 2017-07-16T06:53:27 Z Official Fan of ACG(#1221, cseteram, 16silver, pps789) LR Springboard (FXCUP2_springboard) C++14
0 / 1
0 ms 1128 KB
#include "springboard.h"

void Reorder(int N) {
	int x, p, flip;
	flip = PutBall(N / 2);
	p = N / 2;
	while (p > 0){
		if (flip == 1) flip = PutBall(N + 1 - p);
		else flip = PutBall(p);
		p /= 2;
	}
	if (flip == -1) PutBall(1);
}

Compilation message

springboard.cpp: In function 'void Reorder(int)':
springboard.cpp:4:6: warning: unused variable 'x' [-Wunused-variable]
  int x, p, flip;
      ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1128 KB Output isn't correct
2 Halted 0 ms 0 KB -