답안 #707675

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
707675 2023-03-09T17:57:27 Z AdamGS Lost in the cycle (IOI19_cycle) C++17
33 / 100
2 ms 228 KB
#include "cycle.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void escape(int n) {
	bool x=jump(0);
	if(x) x=jump((n-1)/2);
	while(x) x=jump(1);
	int akt=n-1;
	int po=n-(n-1)/2, ko=n-1;
	while(po<ko) {
		int sr=(po+ko)/2;
		x=jump((sr-akt+n)%n);
		akt=sr;
		if(x) po=sr+1; else ko=sr;
	}
	jump((po-1-akt+2*n)%n);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Too many queries.
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 228 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 208 KB Output is correct
5 Correct 0 ms 208 KB Output is correct
6 Correct 0 ms 208 KB Output is correct
7 Correct 0 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Correct 1 ms 208 KB Output is correct
12 Correct 2 ms 208 KB Output is correct
13 Correct 1 ms 208 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Too many queries.
3 Halted 0 ms 0 KB -