// correct/cycle-bk.java
class cycle {
public void escape(int n) {
int p = (n/4)+1;
boolean check = grader.jump(0);
while(p > 0) {
check = grader.jump(check ? p : (n-p)%n);
p = (p == 1 ? 0 : (p+1)/2);
}
if(!check) grader.jump(n-1);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
121 ms |
11460 KB |
Output is correct |
2 |
Correct |
120 ms |
10908 KB |
Output is correct |
3 |
Correct |
125 ms |
10932 KB |
Output is correct |
4 |
Correct |
114 ms |
10972 KB |
Output is correct |
5 |
Correct |
120 ms |
10964 KB |
Output is correct |
6 |
Correct |
117 ms |
11032 KB |
Output is correct |
7 |
Correct |
119 ms |
10860 KB |
Output is correct |
8 |
Correct |
119 ms |
10944 KB |
Output is correct |
9 |
Correct |
130 ms |
10944 KB |
Output is correct |
10 |
Correct |
129 ms |
10956 KB |
Output is correct |
11 |
Correct |
133 ms |
11092 KB |
Output is correct |
12 |
Correct |
121 ms |
11048 KB |
Output is correct |
13 |
Correct |
117 ms |
10968 KB |
Output is correct |
14 |
Correct |
118 ms |
11012 KB |
Output is correct |
15 |
Correct |
119 ms |
10900 KB |
Output is correct |
16 |
Correct |
115 ms |
10928 KB |
Output is correct |
17 |
Correct |
125 ms |
11032 KB |
Output is correct |
18 |
Correct |
118 ms |
10916 KB |
Output is correct |
19 |
Correct |
115 ms |
11080 KB |
Output is correct |
20 |
Correct |
116 ms |
11076 KB |
Output is correct |
21 |
Correct |
118 ms |
11104 KB |
Output is correct |
22 |
Correct |
119 ms |
11108 KB |
Output is correct |
23 |
Correct |
122 ms |
10980 KB |
Output is correct |
24 |
Correct |
125 ms |
11048 KB |
Output is correct |
25 |
Correct |
119 ms |
11016 KB |
Output is correct |
26 |
Correct |
123 ms |
10924 KB |
Output is correct |
27 |
Correct |
117 ms |
11052 KB |
Output is correct |
28 |
Correct |
120 ms |
10932 KB |
Output is correct |
29 |
Correct |
124 ms |
10940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
118 ms |
10956 KB |
Output is correct |
2 |
Correct |
126 ms |
10920 KB |
Output is correct |
3 |
Correct |
122 ms |
10872 KB |
Output is correct |
4 |
Correct |
117 ms |
11068 KB |
Output is correct |
5 |
Correct |
125 ms |
11064 KB |
Output is correct |
6 |
Correct |
132 ms |
10928 KB |
Output is correct |
7 |
Correct |
120 ms |
11028 KB |
Output is correct |
8 |
Correct |
119 ms |
10964 KB |
Output is correct |
9 |
Correct |
124 ms |
10904 KB |
Output is correct |
10 |
Correct |
123 ms |
10960 KB |
Output is correct |
11 |
Correct |
124 ms |
11060 KB |
Output is correct |
12 |
Correct |
152 ms |
11024 KB |
Output is correct |
13 |
Correct |
132 ms |
11048 KB |
Output is correct |
14 |
Correct |
124 ms |
11128 KB |
Output is correct |
15 |
Correct |
128 ms |
11220 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
121 ms |
11460 KB |
Output is correct |
2 |
Correct |
120 ms |
10908 KB |
Output is correct |
3 |
Correct |
125 ms |
10932 KB |
Output is correct |
4 |
Correct |
114 ms |
10972 KB |
Output is correct |
5 |
Correct |
120 ms |
10964 KB |
Output is correct |
6 |
Correct |
117 ms |
11032 KB |
Output is correct |
7 |
Correct |
119 ms |
10860 KB |
Output is correct |
8 |
Correct |
119 ms |
10944 KB |
Output is correct |
9 |
Correct |
130 ms |
10944 KB |
Output is correct |
10 |
Correct |
129 ms |
10956 KB |
Output is correct |
11 |
Correct |
133 ms |
11092 KB |
Output is correct |
12 |
Correct |
121 ms |
11048 KB |
Output is correct |
13 |
Correct |
117 ms |
10968 KB |
Output is correct |
14 |
Correct |
118 ms |
11012 KB |
Output is correct |
15 |
Correct |
119 ms |
10900 KB |
Output is correct |
16 |
Correct |
115 ms |
10928 KB |
Output is correct |
17 |
Correct |
125 ms |
11032 KB |
Output is correct |
18 |
Correct |
118 ms |
10916 KB |
Output is correct |
19 |
Correct |
115 ms |
11080 KB |
Output is correct |
20 |
Correct |
116 ms |
11076 KB |
Output is correct |
21 |
Correct |
118 ms |
11104 KB |
Output is correct |
22 |
Correct |
119 ms |
11108 KB |
Output is correct |
23 |
Correct |
122 ms |
10980 KB |
Output is correct |
24 |
Correct |
125 ms |
11048 KB |
Output is correct |
25 |
Correct |
119 ms |
11016 KB |
Output is correct |
26 |
Correct |
123 ms |
10924 KB |
Output is correct |
27 |
Correct |
117 ms |
11052 KB |
Output is correct |
28 |
Correct |
120 ms |
10932 KB |
Output is correct |
29 |
Correct |
124 ms |
10940 KB |
Output is correct |
30 |
Correct |
118 ms |
10956 KB |
Output is correct |
31 |
Correct |
126 ms |
10920 KB |
Output is correct |
32 |
Correct |
122 ms |
10872 KB |
Output is correct |
33 |
Correct |
117 ms |
11068 KB |
Output is correct |
34 |
Correct |
125 ms |
11064 KB |
Output is correct |
35 |
Correct |
132 ms |
10928 KB |
Output is correct |
36 |
Correct |
120 ms |
11028 KB |
Output is correct |
37 |
Correct |
119 ms |
10964 KB |
Output is correct |
38 |
Correct |
124 ms |
10904 KB |
Output is correct |
39 |
Correct |
123 ms |
10960 KB |
Output is correct |
40 |
Correct |
124 ms |
11060 KB |
Output is correct |
41 |
Correct |
152 ms |
11024 KB |
Output is correct |
42 |
Correct |
132 ms |
11048 KB |
Output is correct |
43 |
Correct |
124 ms |
11128 KB |
Output is correct |
44 |
Correct |
128 ms |
11220 KB |
Output is correct |
45 |
Correct |
119 ms |
11056 KB |
Output is correct |
46 |
Correct |
117 ms |
11132 KB |
Output is correct |
47 |
Correct |
119 ms |
11096 KB |
Output is correct |
48 |
Correct |
121 ms |
11060 KB |
Output is correct |
49 |
Correct |
124 ms |
11152 KB |
Output is correct |
50 |
Correct |
124 ms |
11060 KB |
Output is correct |
51 |
Correct |
121 ms |
11048 KB |
Output is correct |
52 |
Correct |
131 ms |
11132 KB |
Output is correct |
53 |
Correct |
125 ms |
11008 KB |
Output is correct |
54 |
Correct |
125 ms |
11264 KB |
Output is correct |
55 |
Correct |
121 ms |
11060 KB |
Output is correct |
56 |
Correct |
125 ms |
10912 KB |
Output is correct |
57 |
Correct |
122 ms |
11116 KB |
Output is correct |
58 |
Correct |
125 ms |
11132 KB |
Output is correct |
59 |
Correct |
130 ms |
11188 KB |
Output is correct |
60 |
Correct |
130 ms |
11056 KB |
Output is correct |
61 |
Correct |
127 ms |
11064 KB |
Output is correct |