제출 #1308674

#제출 시각아이디문제언어결과실행 시간메모리
1308674ericl23302Lost in the cycle (IOI19_cycle)C++20
0 / 100
1 ms332 KiB
#include "cycle.h" #include <iostream> using namespace std; void escape(int n) { int l = 0, r = n - 1, half = n / 2 + (n % 2); while ((r - l + n) % n > 0) { int mid = (l + r + 1) / 2; int amount = (half - mid + n) % n; if (jump(amount)) { l = mid; l = (l + amount) % n; r = (r + amount) % n; } else { r = (n + mid - 1) % n; l = (l + amount) % n; r = (r + amount) % n; } } jump((n - l) % n); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...