# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
233069 | Cantfindme | Lost in the cycle (IOI19_cycle) | C++17 | 6 ms | 416 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<int,int> pi;
#define f first
#define s second
#define FAST ios_base::sync_with_stdio(0); cin.tie(0);
#include "cycle.h"
bool test(int x, int jumps, int n) {
int t = (jumps - x + n) % n;
//cout << t << "\n";
return jump(t);
}
void escape(int n) {
if (!jump(0)) {
ll high = n/2;
ll low = 0;
ll cur = 0;
while (high - low > 1) {
ll mid = (high + low) / 2;
//cout << low << " " << mid << " " << high << "\n";
if (test(cur,mid,n) == false) low = mid;
else high = mid;
cur = mid;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |