# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
348015 | 2021-01-14T03:50:27 Z | laoriu | Lost in the cycle (IOI19_cycle) | C++14 | 1 ms | 364 KB |
#include "cycle.h" #include <bits/stdc++.h> using namespace std; void escape(int n) { if (n == 2) { jump(1); return; } int lo, hi; if (jump(0)) { lo = (n + 1) / 2; hi = n - 1; } else { lo = 1; hi = (n + 1) / 2 - 1; } int pre = 0, res; while (lo <= hi) { int mi = (lo + hi) / 2; if (jump((pre + n - mi) % n)) hi = mi - 1; else lo = mi + 1; pre = mi; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 0 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 0 ms | 364 KB | Output is correct |
5 | Correct | 0 ms | 364 KB | Output is correct |
6 | Incorrect | 0 ms | 364 KB | The exit was not found. |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 0 ms | 364 KB | Output is correct |
3 | Correct | 0 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 1 ms | 364 KB | Output is correct |
7 | Incorrect | 1 ms | 364 KB | The exit was not found. |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 0 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 0 ms | 364 KB | Output is correct |
5 | Correct | 0 ms | 364 KB | Output is correct |
6 | Incorrect | 0 ms | 364 KB | The exit was not found. |
7 | Halted | 0 ms | 0 KB | - |