#include "cycle.h"
#include <cstdio>
#include <cassert>
void escape(int n) {
if ( jump(0) ) {
// estoy del lado derecho de la mitad
while ( jump(1) == true );
jump( n-1 );
}
else {
// estoy del lado izquierdo de la mitad
while ( jump(1) == false ) ;
jump( n/2 );
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
256 KB |
Output is correct |
2 |
Incorrect |
1 ms |
256 KB |
Too many queries. |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
256 KB |
Output is correct |
2 |
Correct |
0 ms |
256 KB |
Output is correct |
3 |
Correct |
0 ms |
256 KB |
Output is correct |
4 |
Incorrect |
0 ms |
256 KB |
Too many queries. |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
256 KB |
Output is correct |
2 |
Incorrect |
1 ms |
256 KB |
Too many queries. |
3 |
Halted |
0 ms |
0 KB |
- |