# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
130800 |
2019-07-16T05:45:44 Z |
구재현(#3176) |
Snake (CEOI08_snake) |
C++14 |
|
2 ms |
380 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;
}
tell_length(sr - el + 1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
252 KB |
your estimate differs too much (1 units) |
2 |
Partially correct |
2 ms |
376 KB |
Output is partially correct: estimate ok. 14 calls needed |
3 |
Incorrect |
2 ms |
248 KB |
your estimate differs too much (10 units) |
4 |
Correct |
2 ms |
248 KB |
Output is correct: estimate ok. 13 calls needed |
5 |
Correct |
2 ms |
248 KB |
Output is correct: estimate ok. 13 calls needed |
6 |
Incorrect |
2 ms |
376 KB |
your estimate differs too much (1 units) |
7 |
Partially correct |
2 ms |
376 KB |
Output is partially correct: estimate ok. 14 calls needed |
8 |
Incorrect |
2 ms |
376 KB |
your estimate differs too much (3 units) |
9 |
Incorrect |
2 ms |
248 KB |
your estimate differs too much (4 units) |
10 |
Incorrect |
2 ms |
376 KB |
your estimate differs too much (5 units) |
11 |
Incorrect |
2 ms |
248 KB |
your estimate differs too much (6 units) |
12 |
Incorrect |
2 ms |
376 KB |
your estimate differs too much (1 units) |
13 |
Incorrect |
2 ms |
376 KB |
your estimate differs too much (9 units) |
14 |
Partially correct |
2 ms |
252 KB |
Output is partially correct: estimate ok. 14 calls needed |
15 |
Incorrect |
2 ms |
376 KB |
your estimate differs too much (3 units) |
16 |
Incorrect |
2 ms |
248 KB |
your estimate differs too much (1 units) |
17 |
Partially correct |
2 ms |
380 KB |
Output is partially correct: estimate ok. 14 calls needed |
18 |
Correct |
2 ms |
248 KB |
Output is correct: estimate ok. 13 calls needed |
19 |
Partially correct |
2 ms |
248 KB |
Output is partially correct: estimate ok. 14 calls needed |
20 |
Partially correct |
2 ms |
248 KB |
Output is partially correct: estimate ok. 14 calls needed |