답안 #130801

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
130801 2019-07-16T05:48:41 Z 구재현(#3176) Snake (CEOI08_snake) C++14
0 / 100
2 ms 376 KB
#include <stdio.h>
#include "snakelib.h"

char a1, a2;

int main(){
	int sl = 0, el = 12121;
	int sr = 0, er = 12121;
	int k = get_speed();
	for(int i=0; er - sr > k || el - sl > k; i++){
		el += k;
		er += k;
		int ml = (sl + el) / 2;
		int mr = (sr + er) / 2;
		ask_snake(ml, mr, &a1, &a2);
		if(a1 == 'b') sl = ml + 1;
		else el = ml;
		if(a2 == 'f') er = mr;
		else sr = mr + 1;
	}
	printf("[%d %d], [%d %d]", sl, el, sr, er);
	tell_length(sr - el);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 248 KB invalid interaction
2 Incorrect 2 ms 376 KB invalid interaction
3 Incorrect 2 ms 376 KB invalid interaction
4 Incorrect 2 ms 252 KB invalid interaction
5 Incorrect 2 ms 252 KB invalid interaction
6 Incorrect 2 ms 376 KB invalid interaction
7 Incorrect 2 ms 248 KB invalid interaction
8 Incorrect 2 ms 248 KB invalid interaction
9 Incorrect 2 ms 248 KB invalid interaction
10 Incorrect 2 ms 376 KB invalid interaction
11 Incorrect 2 ms 376 KB invalid interaction
12 Incorrect 2 ms 248 KB invalid interaction
13 Incorrect 2 ms 376 KB invalid interaction
14 Incorrect 2 ms 376 KB invalid interaction
15 Incorrect 2 ms 376 KB invalid interaction
16 Incorrect 2 ms 376 KB invalid interaction
17 Incorrect 2 ms 248 KB invalid interaction
18 Incorrect 2 ms 376 KB invalid interaction
19 Incorrect 2 ms 248 KB invalid interaction
20 Incorrect 2 ms 248 KB invalid interaction