QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#430326#8650. Island Hoppingegypt_ioi2024_04#2 6ms6096kbC++201.9kb2024-06-03 18:02:212024-06-03 18:02:22

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 2
Accepted

Test #1:

score: 2
Accepted
time: 1ms
memory: 6052kb

input:

3 9
3
0
3
0

output:

1 1
-1 3
2 1
-2 3
0 0

result:

ok 

Test #2:

score: 2
Accepted
time: 1ms
memory: 5968kb

input:

3 9
3
0
3
0

output:

1 1
-1 3
2 1
-2 3
0 0

result:

ok 

Test #3:

score: 2
Accepted
time: 1ms
memory: 6052kb

input:

3 9
2
0
1
2
0

output:

1 1
-1 2
2 1
3 1
-2 3
0 0

result:

ok 

Subtask #2:

score: 0
Wrong Answer

Test #4:

score: 4
Accepted
time: 2ms
memory: 5996kb

input:

299 89401
79
0
242
0
192
0
69
0
99
0
29
0
272
0
54
0
67
0
72
0
163
0
196
0
216
0
60
0
225
0
101
0
43
0
23
0
63
0
89
0
38
0
97
0
18
167
0
160
0
212
0
78
0
143
0
6
122
0
45
0
35
0
55
0
159
0
32
199
0
116
0
21
157
0
119
0
163
0
96
0
17
121
0
31
100
0
64
0
50
0
114
0
48
76
0
178
0
105
0
8
33
230
0
118
0...

output:

1 1
-1 79
2 1
-2 242
3 1
-3 192
4 1
-4 69
5 1
-5 99
6 1
-6 29
7 1
-7 272
8 1
-8 54
9 1
-9 67
10 1
-10 72
11 1
-11 163
12 1
-12 196
13 1
-13 216
14 1
-14 60
15 1
-15 225
16 1
-16 101
17 1
-17 43
18 1
-18 23
19 1
-19 63
20 1
-20 89
21 1
-21 38
22 1
-22 97
23 1
24 1
-24 167
25 1
-25 160
26 1
-26 212
27...

result:

ok 

Test #5:

score: 0
Wrong Answer
time: 0ms
memory: 3872kb

input:

300 90000
15
0
17
0
10
0
153
0
43
0
12
0
32
0
178
0
14
0
3
79
0
6
44
0
9
1
229
0
2
256
0
66
0
159
0
190
0
144
0
185
0
60
0
254
0
39
0
55
0
176
0
59
0
95
0
186
0
7
111
0
65
0
193
0
6
0
202
0
249
0
26
223
0
86
0
138
0
5
13
71
0
74
0
141
0
207
0
132
0
7
0
60
0
75
0
17
0
183
0
27
91
0
67
0
203
0
29
24
1...

output:

1 1
-1 15
2 1
-2 17
3 1
-3 10
4 1
-4 153
5 1
-5 43
6 1
-6 12
7 1
-7 32
8 1
-8 178
9 1
-9 14
10 1
11 1
-11 79
12 1
13 1
-13 44
14 1
15 1
16 1
-16 229
17 1
18 1
-18 256
19 1
-19 66
20 1
-20 159
21 1
-21 190
22 1
-22 144
23 1
-23 185
24 1
-24 60
25 1
-25 254
26 1
-26 39
27 1
-27 55
28 1
-28 176
29 1
-2...

result:

wrong answer Wrong Answer [5]

Subtask #3:

score: 0
Wrong Answer

Test #9:

score: 7
Accepted
time: 6ms
memory: 6048kb

input:

299 598
43
0
91
0
7
0
115
0
50
0
157
0
3
106
0
147
0
44
0
31
0
150
0
195
0
113
0
265
0
171
0
47
0
103
0
35
0
199
0
27
0
70
0
274
0
82
0
71
0
101
0
21
112
0
118
0
140
0
11
33
0
32
158
0
19
124
0
196
0
83
0
81
0
127
0
204
0
160
0
1
10
203
0
35
0
17
170
0
222
0
5
99
0
72
0
185
0
244
0
50
0
249
0
179
0
...

output:

1 1
-1 43
2 1
-2 91
3 1
-3 7
4 1
-4 115
5 1
-5 50
6 1
-6 157
7 1
8 1
-8 106
9 1
-9 147
10 1
-10 44
11 1
-11 31
12 1
-12 150
13 1
-13 195
14 1
-14 113
15 1
-15 265
16 1
-16 171
17 1
-17 47
18 1
-18 103
19 1
-19 35
20 1
-20 199
21 1
-21 27
22 1
-22 70
23 1
-23 274
24 1
-24 82
25 1
-25 71
26 1
-26 101
...

result:

ok 

Test #10:

score: 0
Wrong Answer
time: 0ms
memory: 5912kb

input:

300 600
26
0
33
0
65
0
25
0
30
0
147
0
152
0
62
0
55
0
96
0
61
0
135
0
103
0
165
0
40
0
107
0
78
0
215
0
92
0
50
0
112
0
56
0
48
0
68
0
4
1
163
0
296
0
115
0
5
30
0
199
0
2
97
0
297
0
252
0
120
0
189
0
96
0
15
80
0
93
0
75
0
118
0
229
0
283
0
67
0
23
154
0
20
84
0
220
0
64
0
57
0
9
22
54
254
0
133
0...

output:

1 1
-1 26
2 1
-2 33
3 1
-3 65
4 1
-4 25
5 1
-5 30
6 1
-6 147
7 1
-7 152
8 1
-8 62
9 1
-9 55
10 1
-10 96
11 1
-11 61
12 1
-12 135
13 1
-13 103
14 1
-14 165
15 1
-15 40
16 1
-16 107
17 1
-17 78
18 1
-18 215
19 1
-19 92
20 1
-20 50
21 1
-21 112
22 1
-22 56
23 1
-23 48
24 1
-24 68
25 1
26 1
27 1
-27 163...

result:

wrong answer Wrong Answer [5]

Subtask #4:

score: 0
Wrong Answer

Test #15:

score: 0
Wrong Answer
time: 5ms
memory: 6096kb

input:

299 89401
29
0
153
0
166
0
54
0
65
0
75
0
166
0
9
0
8
88
0
19
0
193
0
154
0
26
0
73
0
271
0
231
0
44
0
11
265
0
264
0
83
0
111
0
179
0
41
0
14
116
0
177
0
1
80
0
263
0
48
0
86
0
43
0
1
0
61
0
143
0
90
0
67
0
187
0
25
89
0
34
18
92
0
117
0
169
0
32
228
0
53
0
150
0
200
0
50
4
93
0
53
0
194
0
190
0
99...

output:

1 1
-1 29
2 1
-2 153
3 1
-3 166
4 1
-4 54
5 1
-5 65
6 1
-6 75
7 1
-7 166
8 1
-8 9
9 1
10 1
-10 88
11 1
-11 19
12 1
-12 193
13 1
-13 154
14 1
-14 26
15 1
-15 73
16 1
-16 271
17 1
-17 231
18 1
-18 44
19 1
20 1
-20 265
21 1
-21 264
22 1
-22 83
23 1
-23 111
24 1
-24 179
25 1
-25 41
26 1
27 1
-27 116
28 ...

result:

wrong answer Wrong Answer [5]

Subtask #5:

score: 0
Wrong Answer

Test #23:

score: 13
Accepted
time: 5ms
memory: 5912kb

input:

299 897
140
0
39
0
67
0
214
0
234
0
122
0
174
0
227
0
206
0
65
0
41
0
211
0
117
0
51
0
152
0
195
0
28
0
143
0
127
0
64
0
144
0
119
0
201
0
271
0
109
0
88
0
109
0
17
210
0
36
0
213
0
42
0
197
0
87
0
186
0
30
98
0
41
0
2
101
0
11
32
183
0
116
0
78
0
187
0
190
0
91
0
144
0
143
0
14
153
0
116
0
86
0
214...

output:

1 1
-1 140
2 1
-2 39
3 1
-3 67
4 1
-4 214
5 1
-5 234
6 1
-6 122
7 1
-7 174
8 1
-8 227
9 1
-9 206
10 1
-10 65
11 1
-11 41
12 1
-12 211
13 1
-13 117
14 1
-14 51
15 1
-15 152
16 1
-16 195
17 1
-17 28
18 1
-18 143
19 1
-19 127
20 1
-20 64
21 1
-21 144
22 1
-22 119
23 1
-23 201
24 1
-24 271
25 1
-25 109
...

result:

ok 

Test #24:

score: 0
Wrong Answer
time: 0ms
memory: 5964kb

input:

300 900
46
0
64
0
55
0
94
0
100
0
43
0
71
0
216
0
189
0
281
0
233
0
172
0
108
0
116
0
102
0
67
0
178
0
22
0
37
0
206
0
154
0
18
36
0
64
0
56
0
149
0
60
0
32
0
59
0
34
0
48
0
28
51
0
30
162
0
23
19
179
0
181
0
237
0
123
0
150
0
6
286
0
91
0
1
62
0
31
87
0
97
0
33
85
0
57
0
146
0
3
25
53
120
0
29
27
9...

output:

1 1
-1 46
2 1
-2 64
3 1
-3 55
4 1
-4 94
5 1
-5 100
6 1
-6 43
7 1
-7 71
8 1
-8 216
9 1
-9 189
10 1
-10 281
11 1
-11 233
12 1
-12 172
13 1
-13 108
14 1
-14 116
15 1
-15 102
16 1
-16 67
17 1
-17 178
18 1
-18 22
19 1
-19 37
20 1
-20 206
21 1
-21 154
22 1
23 1
-23 36
24 1
-24 64
25 1
-25 56
26 1
-26 149
...

result:

wrong answer Wrong Answer [5]

Subtask #6:

score: 0
Wrong Answer

Test #32:

score: 0
Wrong Answer
time: 3ms
memory: 6040kb

input:

300 90000
133
0
82
0
65
0
266
0
29
0
24
0
28
0
86
0
186
0
109
0
29
0
105
0
128
0
117
0
108
0
247
0
131
0
234
0
94
0
141
0
160
0
26
0
219
0
6
40
0
22
138
0
7
5
80
0
45
0
102
0
67
0
111
0
6
0
148
0
70
0
119
0
62
0
5
0
6
0
96
0
295
0
46
0
31
44
82
0
128
0
292
0
164
0
109
0
142
0
87
0
299
0
94
0
249
0
1...

output:

1 1
-1 133
2 1
-2 82
3 1
-3 65
4 1
-4 266
5 1
-5 29
6 1
-6 24
7 1
-7 28
8 1
-8 86
9 1
-9 186
10 1
-10 109
11 1
-11 29
12 1
-12 105
13 1
-13 128
14 1
-14 117
15 1
-15 108
16 1
-16 247
17 1
-17 131
18 1
-18 234
19 1
-19 94
20 1
-20 141
21 1
-21 160
22 1
-22 26
23 1
-23 219
24 1
25 1
-25 40
26 1
27 1
-...

result:

wrong answer Wrong Answer [5]

Subtask #7:

score: 0
Wrong Answer

Test #58:

score: 0
Wrong Answer
time: 3ms
memory: 5976kb

input:

300 900
201
0
88
0
97
0
35
0
96
0
70
0
60
0
23
0
46
0
76
0
43
0
69
0
141
0
95
0
159
0
264
0
196
0
119
0
32
0
176
0
235
0
152
0
8
67
0
148
0
31
0
170
0
107
0
244
0
106
0
26
19
77
0
61
0
4
43
0
109
0
31
0
51
0
76
0
197
0
288
0
11
149
0
103
0
9
116
0
87
0
179
0
127
0
39
56
0
156
0
124
0
276
0
52
119
0
...

output:

1 1
-1 201
2 1
-2 88
3 1
-3 97
4 1
-4 35
5 1
-5 96
6 1
-6 70
7 1
-7 60
8 1
-8 23
9 1
-9 46
10 1
-10 76
11 1
-11 43
12 1
-12 69
13 1
-13 141
14 1
-14 95
15 1
-15 159
16 1
-16 264
17 1
-17 196
18 1
-18 119
19 1
-19 32
20 1
-20 176
21 1
-21 235
22 1
-22 152
23 1
24 1
-24 67
25 1
-25 148
26 1
-26 31
27 ...

result:

wrong answer Wrong Answer [5]

Subtask #8:

score: 0
Wrong Answer

Test #84:

score: 0
Wrong Answer
time: 4ms
memory: 5916kb

input:

299 598
86
0
79
0
49
0
124
0
257
0
51
0
214
0
20
0
50
0
177
0
200
0
238
0
66
0
15
0
14
38
0
229
0
175
0
193
0
8
148
0
45
0
234
0
32
0
231
0
175
0
126
0
20
0
142
0
127
0
91
0
24
148
0
246
0
150
0
62
0
109
0
16
54
0
129
0
207
0
57
0
136
0
207
0
22
53
0
215
0
231
0
3
9
6
64
0
46
39
51
0
148
0
42
100
0
...

output:

1 1
-1 86
2 1
-2 79
3 1
-3 49
4 1
-4 124
5 1
-5 257
6 1
-6 51
7 1
-7 214
8 1
-8 20
9 1
-9 50
10 1
-10 177
11 1
-11 200
12 1
-12 238
13 1
-13 66
14 1
-14 15
15 1
16 1
-16 38
17 1
-17 229
18 1
-18 175
19 1
-19 193
20 1
21 1
-21 148
22 1
-22 45
23 1
-23 234
24 1
-24 32
25 1
-25 231
26 1
-26 175
27 1
-2...

result:

wrong answer Wrong Answer [5]