Submission #28539

# Submission time Handle Problem Language Result Execution time Memory
28539 2017-07-16T07:08:49 Z Sorry AcornCkiGuiziTeam(#1226, gs13068) LR Springboard (FXCUP2_springboard) C++14
0 / 1
0 ms 1128 KB
#include "springboard.h"

void Reorder(int N) {
	int L = 1;
	int R = N;
	while (L <= R) {
		int M = L + R >> 1;
		if (PutBall(M) < 0) L = M + 1;
		else R = M - 1;
	}
	while (PutBall(1) != 1);
}

Compilation message

springboard.cpp: In function 'void Reorder(int)':
springboard.cpp:7:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   int M = L + R >> 1;
             ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1128 KB Output isn't correct
2 Halted 0 ms 0 KB -