이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cycle.h"
#include <bits/stdc++.h>
using namespace std;
int p, n;
bool go_to_room(int room)
{
bool res = jump( (room - p + n) % n );
p = room;
return res;
}
void escape(int _n)
{
n = _n;
int st = 1, dr = n-1, mid;
p = 0;
while(st < dr)
{
mid = (st + dr) / 2;
if(go_to_room((mid - n/2 + n) % n)) dr = mid;
else st = mid + 1;
}
go_to_room(st);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |