QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#429617#8650. Island Hoppingegypt_ioi2024_10#22 6ms4116kbC++20920b2024-06-02 18:19:002024-06-02 18:19:00

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3788kb

input:

3 9
3
2

output:

1 1
1 2
2 -1

result:

wrong answer Wrong Answer [2]

Subtask #2:

score: 0
Wrong Answer

Test #4:

score: 0
Wrong Answer
time: 1ms
memory: 4112kb

input:

299 89401
79
213
20
0
0
-1

output:

1 1
1 2
1 3
-1 79
-1 213
-1 20

result:

wrong answer Wrong Answer [5]

Subtask #3:

score: 0
Wrong Answer

Test #9:

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

input:

299 598
43
151
66
0
0
-1

output:

1 1
1 2
1 3
-1 43
-1 151
-1 66

result:

wrong answer Wrong Answer [5]

Subtask #4:

score: 9
Accepted

Test #15:

score: 9
Accepted
time: 0ms
memory: 4108kb

input:

299 89401
29
35
171
0
0
0
1
122
0
29
59
0
99
122
0
59
72
0
99
194
0
57
72
0
194
268
0
57
250
0
9
268
0
8
250
0
9
83
0
8
22
0
83
289
0
22
201
0
229
289
0
201
236
0
138
229
0
164
236
0
38
138
0
90
164
0
38
212
0
86
90
0
33
212
0
86
185
0
33
69
0
185
282
0
69
140
0
214
282
0
140
252
0
214
248
0
97
252
...

output:

1 1
1 2
1 3
-1 29
-1 35
-1 171
29 1
29 2
-29 122
122 1
122 2
-59 122
59 1
59 2
-59 99
99 1
99 2
-72 99
72 1
72 2
-72 194
194 1
194 2
-57 194
57 1
57 2
-57 268
268 1
268 2
-250 268
250 1
250 2
-9 250
9 1
9 2
-8 9
8 1
8 2
-8 83
83 1
83 2
-22 83
22 1
22 2
-22 289
289 1
289 2
-201 289
201 1
201 2
-201 2...

result:

ok 

Test #16:

score: 9
Accepted
time: 2ms
memory: 3760kb

input:

300 90000
28
60
183
0
0
0
1
209
0
28
49
0
209
237
0
49
176
0
237
247
0
113
176
0
63
247
0
113
195
0
63
137
0
184
195
0
16
137
0
184
253
0
16
48
0
35
253
0
48
278
0
27
35
0
241
278
0
27
267
0
205
241
0
227
267
0
205
279
0
148
227
0
19
279
0
12
148
0
19
132
0
12
162
0
132
201
0
33
162
0
89
201
0
33
20...

output:

1 1
1 2
1 3
-1 28
-1 60
-1 183
28 1
28 2
-28 209
209 1
209 2
-49 209
49 1
49 2
-49 237
237 1
237 2
-176 237
176 1
176 2
-176 247
247 1
247 2
-113 247
113 1
113 2
-63 113
63 1
63 2
-63 195
195 1
195 2
-137 195
137 1
137 2
-137 184
184 1
184 2
-16 184
16 1
16 2
-16 253
253 1
253 2
-48 253
48 1
48 2
-3...

result:

ok 

Test #17:

score: 9
Accepted
time: 6ms
memory: 3884kb

input:

300 90000
24
162
167
0
0
0
1
202
0
24
252
0
96
202
0
77
252
0
96
289
0
77
164
0
135
289
0
164
300
0
135
163
0
296
300
0
163
292
0
8
296
0
133
292
0
8
134
0
60
133
0
134
274
0
60
185
0
76
274
0
88
185
0
76
228
0
38
88
0
228
261
0
38
221
0
203
261
0
221
291
0
203
232
0
148
291
0
216
232
0
41
148
0
216...

output:

1 1
1 2
1 3
-1 24
-1 162
-1 167
24 1
24 2
-24 202
202 1
202 2
-202 252
252 1
252 2
-96 252
96 1
96 2
-77 96
77 1
77 2
-77 289
289 1
289 2
-164 289
164 1
164 2
-135 164
135 1
135 2
-135 300
300 1
300 2
-163 300
163 1
163 2
-163 296
296 1
296 2
-292 296
292 1
292 2
-8 292
8 1
8 2
-8 133
133 1
133 2
-1...

result:

ok 

Test #18:

score: 9
Accepted
time: 0ms
memory: 3812kb

input:

300 90000
107
138
277
0
0
0
1
238
0
107
244
0
24
238
0
244
267
0
24
208
0
267
300
0
148
208
0
35
300
0
21
148
0
35
124
0
21
28
0
124
164
0
28
266
0
164
296
0
266
286
0
87
296
0
37
286
0
87
94
0
37
233
0
94
113
0
226
233
0
113
207
0
226
228
0
66
207
0
192
228
0
66
245
0
142
192
0
152
245
0
142
241
0
...

output:

1 1
1 2
1 3
-1 107
-1 138
-1 277
107 1
107 2
-107 238
238 1
238 2
-238 244
244 1
244 2
-24 244
24 1
24 2
-24 267
267 1
267 2
-208 267
208 1
208 2
-208 300
300 1
300 2
-148 300
148 1
148 2
-35 148
35 1
35 2
-21 35
21 1
21 2
-21 124
124 1
124 2
-28 124
28 1
28 2
-28 164
164 1
164 2
-164 266
266 1
266 ...

result:

ok 

Test #19:

score: 9
Accepted
time: 5ms
memory: 4112kb

input:

300 90000
65
88
283
0
0
0
1
16
0
21
65
0
16
61
0
21
86
0
42
61
0
86
128
0
5
42
0
81
128
0
5
80
0
81
124
0
25
80
0
26
124
0
25
233
0
26
71
0
15
233
0
71
259
0
15
225
0
8
259
0
108
225
0
8
166
0
96
108
0
166
257
0
68
96
0
67
257
0
52
68
0
67
105
0
52
154
0
105
300
0
141
154
0
295
300
0
87
141
0
245
29...

output:

1 1
1 2
1 3
-1 65
-1 88
-1 283
65 1
65 2
-16 65
16 1
16 2
-16 21
21 1
21 2
-21 61
61 1
61 2
-61 86
86 1
86 2
-42 86
42 1
42 2
-42 128
128 1
128 2
-5 128
5 1
5 2
-5 81
81 1
81 2
-80 81
80 1
80 2
-80 124
124 1
124 2
-25 124
25 1
25 2
-25 26
26 1
26 2
-26 233
233 1
233 2
-71 233
71 1
71 2
-15 71
15 1
1...

result:

ok 

Test #20:

score: 9
Accepted
time: 0ms
memory: 4116kb

input:

299 89401
124
149
153
0
0
0
1
13
0
124
180
0
13
83
0
29
180
0
83
274
0
29
222
0
49
274
0
222
236
0
49
192
0
236
272
0
110
192
0
191
272
0
110
278
0
191
217
0
45
278
0
168
217
0
45
126
0
12
168
0
28
126
0
12
43
0
28
35
0
43
247
0
9
35
0
85
247
0
9
252
0
67
85
0
252
267
0
67
252
1
289
0
75
149
0
193
2...

output:

1 1
1 2
1 3
-1 124
-1 149
-1 153
124 1
124 2
-13 124
13 1
13 2
-13 180
180 1
180 2
-83 180
83 1
83 2
-29 83
29 1
29 2
-29 274
274 1
274 2
-222 274
222 1
222 2
-49 222
49 1
49 2
-49 236
236 1
236 2
-192 236
192 1
192 2
-192 272
272 1
272 2
-110 272
110 1
110 2
-110 191
191 1
191 2
-191 278
278 1
278 ...

result:

ok 

Test #21:

score: 9
Accepted
time: 5ms
memory: 3828kb

input:

300 90000
107
159
183
0
0
0
1
224
0
63
107
0
155
224
0
63
223
0
155
196
0
3
223
0
196
210
0
3
44
0
179
210
0
44
139
0
52
179
0
139
244
0
52
297
0
77
244
0
235
297
0
71
77
0
204
235
0
71
84
0
204
239
0
84
170
0
122
239
0
170
263
0
2
122
0
151
263
0
2
123
0
151
276
0
5
123
0
165
276
0
5
175
0
74
165
0...

output:

1 1
1 2
1 3
-1 107
-1 159
-1 183
107 1
107 2
-107 224
224 1
224 2
-63 224
63 1
63 2
-63 155
155 1
155 2
-155 223
223 1
223 2
-196 223
196 1
196 2
-3 196
3 1
3 2
-3 210
210 1
210 2
-44 210
44 1
44 2
-44 179
179 1
179 2
-139 179
139 1
139 2
-52 139
52 1
52 2
-52 244
244 1
244 2
-244 297
297 1
297 2
-7...

result:

ok 

Test #22:

score: 9
Accepted
time: 0ms
memory: 4108kb

input:

300 90000
38
112
211
0
0
0
1
50
0
38
162
0
8
50
0
61
162
0
8
166
0
61
283
0
166
182
0
197
283
0
11
182
0
137
197
0
11
277
0
137
297
0
29
277
0
102
297
0
29
70
0
33
102
0
70
135
0
33
237
0
135
149
0
97
237
0
122
149
0
17
97
0
122
201
0
17
262
0
201
243
0
32
262
0
18
243
0
32
45
0
18
36
0
45
151
0
36
...

output:

1 1
1 2
1 3
-1 38
-1 112
-1 211
38 1
38 2
-38 50
50 1
50 2
-50 162
162 1
162 2
-8 162
8 1
8 2
-8 61
61 1
61 2
-61 166
166 1
166 2
-166 283
283 1
283 2
-182 283
182 1
182 2
-182 197
197 1
197 2
-11 197
11 1
11 2
-11 137
137 1
137 2
-137 277
277 1
277 2
-277 297
297 1
297 2
-29 297
29 1
29 2
-29 102
1...

result:

ok 

Subtask #5:

score: 13
Accepted

Test #23:

score: 13
Accepted
time: 0ms
memory: 3892kb

input:

299 897
140
269
276
0
0
0
1
288
0
56
140
0
138
288
0
56
247
0
123
138
0
227
247
0
8
123
0
227
237
0
8
152
0
15
237
0
152
207
0
15
110
0
207
240
0
7
110
0
174
240
0
7
69
0
131
174
0
40
69
0
101
131
0
40
273
0
101
291
0
242
273
0
257
291
0
33
242
0
197
257
0
33
233
0
168
197
0
233
286
0
76
168
0
222
2...

output:

1 1
1 2
1 3
-1 140
-1 269
-1 276
140 1
140 2
-140 288
288 1
288 2
-56 288
56 1
56 2
-56 138
138 1
138 2
-138 247
247 1
247 2
-123 247
123 1
123 2
-123 227
227 1
227 2
-8 227
8 1
8 2
-8 237
237 1
237 2
-152 237
152 1
152 2
-15 152
15 1
15 2
-15 207
207 1
207 2
-110 207
110 1
110 2
-110 240
240 1
240 ...

result:

ok 

Test #24:

score: 13
Accepted
time: 2ms
memory: 3812kb

input:

300 900
46
127
191
0
0
0
1
298
0
46
282
0
18
298
0
22
282
0
18
184
0
22
118
0
65
184
0
118
166
0
65
220
0
129
166
0
168
220
0
102
129
0
15
168
0
102
252
0
15
251
0
227
252
0
214
251
0
174
227
0
36
214
0
23
174
0
36
71
0
7
23
0
71
240
0
7
136
0
62
240
0
47
136
0
62
155
0
47
156
0
155
164
0
156
247
0
...

output:

1 1
1 2
1 3
-1 46
-1 127
-1 191
46 1
46 2
-46 298
298 1
298 2
-282 298
282 1
282 2
-18 282
18 1
18 2
-18 22
22 1
22 2
-22 184
184 1
184 2
-118 184
118 1
118 2
-65 118
65 1
65 2
-65 166
166 1
166 2
-166 220
220 1
220 2
-129 220
129 1
129 2
-129 168
168 1
168 2
-102 168
102 1
102 2
-15 102
15 1
15 2
-...

result:

ok 

Test #25:

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

input:

300 900
60
131
298
0
0
0
1
114
0
60
291
0
114
224
0
272
291
0
62
224
0
79
272
0
18
62
0
79
216
0
18
32
0
151
216
0
32
150
0
5
151
0
150
199
0
5
248
0
199
285
0
248
276
0
171
285
0
20
276
0
120
171
0
20
147
0
68
120
0
147
169
0
68
283
0
169
202
0
121
283
0
30
202
0
78
121
0
30
42
0
78
278
0
42
176
0
...

output:

1 1
1 2
1 3
-1 60
-1 131
-1 298
60 1
60 2
-60 114
114 1
114 2
-114 291
291 1
291 2
-224 291
224 1
224 2
-224 272
272 1
272 2
-62 272
62 1
62 2
-62 79
79 1
79 2
-18 79
18 1
18 2
-18 216
216 1
216 2
-32 216
32 1
32 2
-32 151
151 1
151 2
-150 151
150 1
150 2
-5 150
5 1
5 2
-5 199
199 1
199 2
-199 248
2...

result:

ok 

Test #26:

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

input:

300 900
8
179
200
0
0
0
1
132
0
8
174
0
13
132
0
59
174
0
13
35
0
59
222
0
35
67
0
196
222
0
67
250
0
106
196
0
163
250
0
91
106
0
163
192
0
91
116
0
192
205
0
116
160
0
19
205
0
160
260
0
18
19
0
260
275
0
18
39
0
72
275
0
26
39
0
72
208
0
26
166
0
208
264
0
166
218
0
87
264
0
218
291
0
87
240
0
21...

output:

1 1
1 2
1 3
-1 8
-1 179
-1 200
8 1
8 2
-8 132
132 1
132 2
-132 174
174 1
174 2
-13 174
13 1
13 2
-13 59
59 1
59 2
-35 59
35 1
35 2
-35 222
222 1
222 2
-67 222
67 1
67 2
-67 196
196 1
196 2
-196 250
250 1
250 2
-106 250
106 1
106 2
-106 163
163 1
163 2
-91 163
91 1
91 2
-91 192
192 1
192 2
-116 192
1...

result:

ok 

Test #27:

score: 13
Accepted
time: 6ms
memory: 4112kb

input:

300 900
94
172
267
0
0
0
1
20
0
71
94
0
20
155
0
71
110
0
155
198
0
110
146
0
60
198
0
146
223
0
60
289
0
56
223
0
237
289
0
56
202
0
112
237
0
142
202
0
112
163
0
126
142
0
98
163
0
99
126
0
21
98
0
99
278
0
21
261
0
246
278
0
125
261
0
211
246
0
125
219
0
36
211
0
159
219
0
36
37
0
26
159
0
37
221...

output:

1 1
1 2
1 3
-1 94
-1 172
-1 267
94 1
94 2
-20 94
20 1
20 2
-20 71
71 1
71 2
-71 155
155 1
155 2
-110 155
110 1
110 2
-110 198
198 1
198 2
-146 198
146 1
146 2
-60 146
60 1
60 2
-60 223
223 1
223 2
-223 289
289 1
289 2
-56 289
56 1
56 2
-56 237
237 1
237 2
-202 237
202 1
202 2
-112 202
112 1
112 2
-1...

result:

ok 

Test #28:

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

input:

300 900
4
12
58
0
0
0
1
36
0
4
171
0
36
47
0
163
171
0
47
236
0
2
163
0
179
236
0
2
143
0
179
209
0
143
186
0
209
237
0
26
186
0
237
296
0
26
215
0
79
296
0
32
215
0
79
229
0
32
111
0
193
229
0
93
111
0
20
193
0
93
285
0
20
295
0
280
285
0
14
295
0
280
281
0
14
154
0
56
281
0
154
288
0
56
202
0
214
...

output:

1 1
1 2
1 3
-1 4
-1 12
-1 58
4 1
4 2
-4 36
36 1
36 2
-36 171
171 1
171 2
-47 171
47 1
47 2
-47 163
163 1
163 2
-163 236
236 1
236 2
-2 236
2 1
2 2
-2 179
179 1
179 2
-143 179
143 1
143 2
-143 209
209 1
209 2
-186 209
186 1
186 2
-186 237
237 1
237 2
-26 237
26 1
26 2
-26 296
296 1
296 2
-215 296
215...

result:

ok 

Test #29:

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

input:

299 897
56
138
273
0
0
0
1
51
0
56
128
0
51
182
0
77
128
0
80
182
0
77
220
0
63
80
0
19
220
0
63
209
0
19
37
0
209
214
0
37
148
0
52
214
0
55
148
0
52
115
0
55
242
0
69
115
0
95
242
0
33
69
0
95
295
0
33
189
0
270
295
0
181
189
0
266
270
0
181
183
0
81
266
0
162
183
0
81
254
0
141
162
0
252
254
0
14...

output:

1 1
1 2
1 3
-1 56
-1 138
-1 273
56 1
56 2
-51 56
51 1
51 2
-51 128
128 1
128 2
-128 182
182 1
182 2
-77 182
77 1
77 2
-77 80
80 1
80 2
-80 220
220 1
220 2
-63 220
63 1
63 2
-19 63
19 1
19 2
-19 209
209 1
209 2
-37 209
37 1
37 2
-37 214
214 1
214 2
-148 214
148 1
148 2
-52 148
52 1
52 2
-52 55
55 1
5...

result:

ok 

Test #30:

score: 13
Accepted
time: 6ms
memory: 3776kb

input:

300 900
127
219
267
0
0
0
1
216
0
25
127
0
17
216
0
25
107
0
17
278
0
107
113
0
158
278
0
82
113
0
158
273
0
82
110
0
229
273
0
110
183
0
93
229
0
183
207
0
59
93
0
20
207
0
59
195
0
20
160
0
104
195
0
160
300
0
104
292
0
94
300
0
255
292
0
14
94
0
9
255
0
14
83
0
9
164
0
83
297
0
136
164
0
157
297
...

output:

1 1
1 2
1 3
-1 127
-1 219
-1 267
127 1
127 2
-127 216
216 1
216 2
-25 216
25 1
25 2
-17 25
17 1
17 2
-17 107
107 1
107 2
-107 278
278 1
278 2
-113 278
113 1
113 2
-113 158
158 1
158 2
-82 158
82 1
82 2
-82 273
273 1
273 2
-110 273
110 1
110 2
-110 229
229 1
229 2
-183 229
183 1
183 2
-93 183
93 1
93...

result:

ok 

Test #31:

score: 13
Accepted
time: 2ms
memory: 3772kb

input:

300 900
96
144
170
0
0
0
1
180
0
96
192
0
180
276
0
18
192
0
217
276
0
18
264
0
19
217
0
132
264
0
2
19
0
7
132
0
2
248
0
7
156
0
182
248
0
30
156
0
93
182
0
30
243
0
93
196
0
63
243
0
196
229
0
63
245
0
84
229
0
245
275
0
84
101
0
38
275
0
101
231
0
38
70
0
223
231
0
27
70
0
45
223
0
27
253
0
45
28...

output:

1 1
1 2
1 3
-1 96
-1 144
-1 170
96 1
96 2
-96 180
180 1
180 2
-180 192
192 1
192 2
-192 276
276 1
276 2
-18 276
18 1
18 2
-18 217
217 1
217 2
-217 264
264 1
264 2
-19 264
19 1
19 2
-19 132
132 1
132 2
-2 132
2 1
2 2
-2 7
7 1
7 2
-7 248
248 1
248 2
-156 248
156 1
156 2
-156 182
182 1
182 2
-30 182
30...

result:

ok 

Subtask #6:

score: 0
Wrong Answer

Test #32:

score: 0
Wrong Answer
time: 1ms
memory: 3820kb

input:

300 90000
133
179
89
0
0
-1

output:

1 1
1 2
1 3
-1 133
-1 179
-1 89

result:

wrong answer Wrong Answer [5]

Subtask #7:

score: 0
Wrong Answer

Test #58:

score: 0
Wrong Answer
time: 1ms
memory: 3852kb

input:

300 900
201
228
171
0
0
-1

output:

1 1
1 2
1 3
-1 201
-1 228
-1 171

result:

wrong answer Wrong Answer [5]

Subtask #8:

score: 0
Wrong Answer

Test #84:

score: 0
Wrong Answer
time: 1ms
memory: 3900kb

input:

299 598
86
94
224
0
0
-1

output:

1 1
1 2
1 3
-1 86
-1 94
-1 224

result:

wrong answer Wrong Answer [5]