답안 #569860

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
569860 2022-05-28T01:29:33 Z Aurora2005 Lost in the cycle (IOI19_cycle) C++14
0 / 100
1 ms 208 KB
#include<bits/stdc++.h>
#include"cycle.h"
using namespace std;

void escape(int N){
  int l=0,r=N,p=0;
  while(r-l != 1 && (l != N-1 || r != 0)){
    int L = l;
    int R = r;
    if(L > R) R += N;
    int M = (L+R)/2;
    int d = N-N/2-M;
    if(d < 0) d += 5*N;
    d %= N;
    p += d;
    p %= N;
    if(jump(d)){
      l = M;
    }
    else{
      r = M;
    }
  }
  int now = l+p;
  now %= N;
  if(now != 0) jump(N-now);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 1 ms 208 KB Output is correct
3 Incorrect 1 ms 208 KB The exit was not found.
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB The exit was not found.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 1 ms 208 KB Output is correct
3 Incorrect 1 ms 208 KB The exit was not found.
4 Halted 0 ms 0 KB -