QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#429414#8650. Island Hoppingegypt_ioi2024_10#13 4ms1648kbC++20213b2024-06-02 14:36:252024-06-02 14:36:26

詳細信息

Subtask #1:

score: 2
Accepted

Test #1:

score: 2
Accepted
time: 0ms
memory: 1556kb

input:

3 9
2
3
0
1
0

output:

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

result:

ok 

Test #2:

score: 2
Accepted
time: 0ms
memory: 1604kb

input:

3 9
2
3
0
1
0

output:

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

result:

ok 

Test #3:

score: 2
Accepted
time: 0ms
memory: 1532kb

input:

3 9
3
2
0
1
0

output:

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

result:

ok 

Subtask #2:

score: 4
Accepted

Test #4:

score: 4
Accepted
time: 3ms
memory: 1628kb

input:

299 89401
176
133
0
183
0
32
0
35
0
241
0
291
0
245
0
90
0
138
0
177
0
111
0
206
0
81
0
142
0
274
0
292
0
236
0
70
0
141
0
200
0
215
0
98
0
266
0
224
0
80
0
76
0
51
0
131
0
154
0
30
0
122
0
190
0
63
0
19
0
222
0
264
0
100
0
46
0
188
0
198
0
148
0
69
0
4
0
227
0
263
0
91
0
247
0
197
0
104
0
250
0
38
...

output:

1 298
176 1
-133 176
176 2
-133 183
176 3
-32 183
176 4
-32 35
176 5
-35 241
176 6
-241 291
176 7
-245 291
176 8
-90 245
176 9
-90 138
176 10
-138 177
176 11
-111 177
176 12
-111 206
176 13
-81 206
176 14
-81 142
176 15
-142 274
176 16
-274 292
176 17
-236 292
176 18
-70 236
176 19
-70 141
176 20
-1...

result:

ok 

Test #5:

score: 4
Accepted
time: 1ms
memory: 1612kb

input:

300 90000
114
229
0
16
0
288
0
182
0
116
0
143
0
246
0
183
0
54
0
190
0
21
0
280
0
92
0
83
0
168
0
104
0
173
0
121
0
88
0
96
0
175
0
128
0
259
0
212
0
110
0
300
0
289
0
221
0
215
0
297
0
218
0
8
0
178
0
157
0
148
0
274
0
84
0
249
0
38
0
275
0
211
0
298
0
63
0
117
0
98
0
244
0
276
0
31
0
186
0
119
0
...

output:

1 299
114 1
-114 229
114 2
-16 229
114 3
-16 288
114 4
-182 288
114 5
-116 182
114 6
-116 143
114 7
-143 246
114 8
-183 246
114 9
-54 183
114 10
-54 190
114 11
-21 190
114 12
-21 280
114 13
-92 280
114 14
-83 92
114 15
-83 168
114 16
-104 168
114 17
-104 173
114 18
-121 173
114 19
-88 121
114 20
-88...

result:

ok 

Test #6:

score: 4
Accepted
time: 0ms
memory: 1528kb

input:

300 90000
64
170
0
78
0
164
0
143
0
140
0
85
0
31
0
298
0
190
0
236
0
147
0
169
0
200
0
174
0
112
0
30
0
162
0
248
0
96
0
293
0
275
0
192
0
230
0
283
0
135
0
289
0
50
0
281
0
55
0
285
0
277
0
145
0
233
0
63
0
120
0
273
0
212
0
240
0
238
0
264
0
287
0
101
0
123
0
98
0
100
0
11
0
62
0
173
0
161
0
16
0...

output:

1 299
64 1
-64 170
64 2
-78 170
64 3
-78 164
64 4
-143 164
64 5
-140 143
64 6
-85 140
64 7
-31 85
64 8
-31 298
64 9
-190 298
64 10
-190 236
64 11
-147 236
64 12
-147 169
64 13
-169 200
64 14
-174 200
64 15
-112 174
64 16
-30 112
64 17
-30 162
64 18
-162 248
64 19
-96 248
64 20
-96 293
64 21
-275 293...

result:

ok 

Test #7:

score: 4
Accepted
time: 3ms
memory: 1624kb

input:

300 90000
145
144
0
182
0
33
0
293
0
242
0
17
0
15
0
288
0
92
0
214
0
85
0
140
0
31
0
104
0
248
0
108
0
277
0
200
0
148
0
137
0
72
0
132
0
192
0
119
0
54
0
39
0
154
0
290
0
5
0
291
0
46
0
207
0
270
0
220
0
70
0
226
0
185
0
27
0
88
0
74
0
202
0
232
0
10
0
189
0
150
0
112
0
113
0
59
0
160
0
249
0
223
...

output:

1 299
145 1
-144 145
145 2
-144 182
145 3
-33 182
145 4
-33 293
145 5
-242 293
145 6
-17 242
145 7
-15 17
145 8
-15 288
145 9
-92 288
145 10
-92 214
145 11
-85 214
145 12
-85 140
145 13
-31 140
145 14
-31 104
145 15
-104 248
145 16
-108 248
145 17
-108 277
145 18
-200 277
145 19
-148 200
145 20
-137...

result:

ok 

Test #8:

score: 4
Accepted
time: 4ms
memory: 1648kb

input:

300 90000
63
71
0
92
0
10
0
146
0
243
0
60
0
147
0
100
0
12
0
258
0
268
0
231
0
113
0
117
0
211
0
242
0
209
0
95
0
288
0
253
0
97
0
219
0
11
0
226
0
120
0
103
0
110
0
275
0
254
0
182
0
115
0
35
0
123
0
98
0
281
0
55
0
107
0
4
0
161
0
252
0
159
0
236
0
266
0
282
0
2
0
28
0
298
0
88
0
114
0
8
0
169
0
...

output:

1 299
63 1
-63 71
63 2
-71 92
63 3
-10 92
63 4
-10 146
63 5
-146 243
63 6
-60 243
63 7
-60 147
63 8
-100 147
63 9
-12 100
63 10
-12 258
63 11
-258 268
63 12
-231 268
63 13
-113 231
63 14
-113 117
63 15
-117 211
63 16
-211 242
63 17
-209 242
63 18
-95 209
63 19
-95 288
63 20
-253 288
63 21
-97 253
63...

result:

ok 

Subtask #3:

score: 7
Accepted

Test #9:

score: 7
Accepted
time: 3ms
memory: 1632kb

input:

299 598
268
164
0
75
0
287
0
143
0
156
0
88
0
220
0
209
0
239
0
169
0
216
0
213
0
218
0
112
0
28
0
232
0
84
0
217
0
187
0
295
0
15
0
265
0
102
0
148
0
266
0
49
0
222
0
292
0
137
0
223
0
131
0
114
0
184
0
173
0
190
0
130
0
3
0
7
0
181
0
214
0
255
0
73
0
205
0
159
0
69
0
76
0
126
0
175
0
65
0
208
0
79...

output:

1 298
268 1
-164 268
268 2
-75 164
268 3
-75 287
268 4
-143 287
268 5
-143 156
268 6
-88 156
268 7
-88 220
268 8
-209 220
268 9
-209 239
268 10
-169 239
268 11
-169 216
268 12
-213 216
268 13
-213 218
268 14
-112 218
268 15
-28 112
268 16
-28 232
268 17
-84 232
268 18
-84 217
268 19
-187 217
268 20
...

result:

ok 

Test #10:

score: 7
Accepted
time: 1ms
memory: 1608kb

input:

300 600
237
201
0
216
0
63
0
267
0
159
0
141
0
238
0
129
0
196
0
186
0
4
0
25
0
205
0
124
0
294
0
253
0
29
0
115
0
145
0
175
0
73
0
257
0
292
0
239
0
207
0
206
0
171
0
262
0
213
0
82
0
184
0
135
0
12
0
234
0
101
0
64
0
53
0
198
0
299
0
18
0
215
0
177
0
164
0
219
0
235
0
148
0
85
0
127
0
275
0
62
0
8...

output:

1 299
237 1
-201 237
237 2
-201 216
237 3
-63 216
237 4
-63 267
237 5
-159 267
237 6
-141 159
237 7
-141 238
237 8
-129 238
237 9
-129 196
237 10
-186 196
237 11
-4 186
237 12
-4 25
237 13
-25 205
237 14
-124 205
237 15
-124 294
237 16
-253 294
237 17
-29 253
237 18
-29 115
237 19
-115 145
237 20
-1...

result:

ok 

Test #11:

score: 7
Accepted
time: 3ms
memory: 1536kb

input:

300 600
58
13
0
77
0
192
0
54
0
269
0
193
0
62
0
133
0
32
0
21
0
94
0
157
0
280
0
67
0
35
0
103
0
164
0
213
0
182
0
45
0
117
0
119
0
175
0
52
0
202
0
69
0
248
0
286
0
75
0
149
0
243
0
279
0
12
0
18
0
60
0
289
0
187
0
47
0
220
0
57
0
190
0
104
0
142
0
144
0
206
0
259
0
185
0
207
0
33
0
3
0
141
0
56
0...

output:

1 299
58 1
-13 58
58 2
-13 77
58 3
-77 192
58 4
-54 192
58 5
-54 269
58 6
-193 269
58 7
-62 193
58 8
-62 133
58 9
-32 133
58 10
-21 32
58 11
-21 94
58 12
-94 157
58 13
-157 280
58 14
-67 280
58 15
-35 67
58 16
-35 103
58 17
-103 164
58 18
-164 213
58 19
-182 213
58 20
-45 182
58 21
-45 117
58 22
-11...

result:

ok 

Test #12:

score: 7
Accepted
time: 0ms
memory: 1576kb

input:

300 600
229
259
0
124
0
276
0
142
0
115
0
32
0
120
0
172
0
117
0
54
0
280
0
206
0
205
0
283
0
26
0
154
0
210
0
173
0
182
0
129
0
160
0
72
0
246
0
100
0
228
0
209
0
152
0
15
0
136
0
96
0
207
0
196
0
224
0
146
0
21
0
171
0
13
0
279
0
22
0
291
0
286
0
133
0
86
0
153
0
245
0
197
0
75
0
70
0
138
0
127
0
...

output:

1 299
229 1
-229 259
229 2
-124 259
229 3
-124 276
229 4
-142 276
229 5
-115 142
229 6
-32 115
229 7
-32 120
229 8
-120 172
229 9
-117 172
229 10
-54 117
229 11
-54 280
229 12
-206 280
229 13
-205 206
229 14
-205 283
229 15
-26 283
229 16
-26 154
229 17
-154 210
229 18
-173 210
229 19
-173 182
229 2...

result:

ok 

Test #13:

score: 7
Accepted
time: 3ms
memory: 1540kb

input:

300 600
189
241
0
205
0
211
0
197
0
195
0
282
0
96
0
111
0
172
0
293
0
37
0
220
0
55
0
104
0
138
0
273
0
198
0
146
0
169
0
160
0
208
0
16
0
45
0
36
0
8
0
125
0
76
0
158
0
14
0
22
0
248
0
15
0
103
0
161
0
94
0
39
0
269
0
4
0
122
0
177
0
108
0
183
0
156
0
297
0
201
0
296
0
28
0
155
0
40
0
66
0
6
0
295...

output:

1 299
189 1
-189 241
189 2
-205 241
189 3
-205 211
189 4
-197 211
189 5
-195 197
189 6
-195 282
189 7
-96 282
189 8
-96 111
189 9
-111 172
189 10
-172 293
189 11
-37 293
189 12
-37 220
189 13
-55 220
189 14
-55 104
189 15
-104 138
189 16
-138 273
189 17
-198 273
189 18
-146 198
189 19
-146 169
189 2...

result:

ok 

Test #14:

score: 7
Accepted
time: 0ms
memory: 1592kb

input:

300 600
41
44
0
209
0
252
0
199
0
216
0
183
0
20
0
12
0
112
0
239
0
110
0
291
0
99
0
28
0
36
0
207
0
171
0
61
0
35
0
37
0
256
0
170
0
144
0
247
0
114
0
184
0
169
0
17
0
201
0
210
0
159
0
292
0
228
0
198
0
119
0
250
0
2
0
70
0
118
0
29
0
214
0
8
0
117
0
279
0
105
0
72
0
173
0
269
0
167
0
195
0
56
0
1...

output:

1 299
41 1
-41 44
41 2
-44 209
41 3
-209 252
41 4
-199 252
41 5
-199 216
41 6
-183 216
41 7
-20 183
41 8
-12 20
41 9
-12 112
41 10
-112 239
41 11
-110 239
41 12
-110 291
41 13
-99 291
41 14
-28 99
41 15
-28 36
41 16
-36 207
41 17
-171 207
41 18
-61 171
41 19
-35 61
41 20
-35 37
41 21
-37 256
41 22
-...

result:

ok 

Subtask #4:

score: 0
Wrong Answer

Test #15:

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

input:

299 89401
11
19
0
68
0
296
0
206
0
272
0
52
0
200
0
80
0
30
0
110
0
243
0
202
0
218
0
183
0
254
0
102
0
105
0
84
0
93
0
55
0
290
0
299
0
276
0
98
0
207
0
204
0
27
0
116
0
235
0
118
0
237
0
51
0
150
0
145
0
197
0
285
0
288
0
32
0
48
0
128
0
165
0
143
0
37
0
239
0
17
0
231
0
244
0
79
0
258
0
176
0
6
0...

output:

1 298
11 1
-11 19
11 2
-19 68
11 3
-68 296
11 4
-206 296
11 5
-206 272
11 6
-52 272
11 7
-52 200
11 8
-80 200
11 9
-30 80
11 10
-30 110
11 11
-110 243
11 12
-202 243
11 13
-202 218
11 14
-183 218
11 15
-183 254
11 16
-102 254
11 17
-102 105
11 18
-84 105
11 19
-84 93
11 20
-55 93
11 21
-55 290
11 22...

result:

wrong answer Wrong Answer [5]

Subtask #5:

score: 0
Wrong Answer

Test #23:

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

input:

299 897
180
194
0
21
0
144
0
49
0
225
0
17
0
28
0
103
0
71
0
149
0
205
0
158
0
163
0
245
0
146
0
6
0
122
0
290
0
216
0
135
0
175
0
136
0
251
0
108
0
81
0
66
0
73
0
202
0
248
0
43
0
183
0
82
0
262
0
4
0
214
0
55
0
279
0
77
0
159
0
84
0
234
0
5
0
244
0
267
0
29
0
210
0
114
0
113
0
264
0
198
0
209
0
17...

output:

1 298
180 1
-180 194
180 2
-21 194
180 3
-21 144
180 4
-49 144
180 5
-49 225
180 6
-17 225
180 7
-17 28
180 8
-28 103
180 9
-71 103
180 10
-71 149
180 11
-149 205
180 12
-158 205
180 13
-158 163
180 14
-163 245
180 15
-146 245
180 16
-6 146
180 17
-6 122
180 18
-122 290
180 19
-216 290
180 20
-135 2...

result:

wrong answer Wrong Answer [5]

Subtask #6:

score: 0
Wrong Answer

Test #32:

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

input:

300 90000
176
296
0
200
0
64
0
247
-1

output:

1 299
176 1
-176 296
176 2
-200 296
176 3
-64 200
176 4
-64 247

result:

wrong answer Wrong Answer [5]

Subtask #7:

score: 0
Wrong Answer

Test #58:

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

input:

300 900
239
249
0
294
0
93
0
241
0
245
-1

output:

1 299
239 1
-239 249
239 2
-249 294
239 3
-93 294
239 4
-93 241
239 5
-241 245

result:

wrong answer Wrong Answer [5]

Subtask #8:

score: 0
Wrong Answer

Test #84:

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

input:

299 598
44
207
0
41
0
53
-1

output:

1 298
44 1
-44 207
44 2
-41 207
44 3
-41 53

result:

wrong answer Wrong Answer [5]