Submission #146545

# Submission time Handle Problem Language Result Execution time Memory
146545 2019-08-24T10:48:57 Z tjd229 Lost in the cycle (IOI19_cycle) C++14
33 / 100
2 ms 376 KB
#include "cycle.h"

void escape(int n) {
	int half = n >> 1;
	int prev = 0;
	int l = 0, r = n - 1;
	int toM = -1;
	while (l <= r) {
		int m = (l + r) >> 1;
		if (jump((n - prev + m) % n)) {
			r = m - 1;
			toM = m;
		}
		else l = m + 1;
		prev = m;
	}
	jump((n-prev+toM+half)%n);
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 252 KB Output is correct
4 Correct 2 ms 248 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 248 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 304 KB Output is correct
10 Correct 2 ms 248 KB Output is correct
11 Correct 2 ms 248 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 248 KB Output is correct
14 Correct 2 ms 248 KB Output is correct
15 Incorrect 2 ms 252 KB The exit was not found
16 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 248 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 248 KB Output is correct
11 Correct 2 ms 248 KB Output is correct
12 Correct 2 ms 248 KB Output is correct
13 Correct 2 ms 248 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 252 KB Output is correct
4 Correct 2 ms 248 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 248 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 304 KB Output is correct
10 Correct 2 ms 248 KB Output is correct
11 Correct 2 ms 248 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 248 KB Output is correct
14 Correct 2 ms 248 KB Output is correct
15 Incorrect 2 ms 252 KB The exit was not found
16 Halted 0 ms 0 KB -