QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#450304#8650. Island Hoppingchen_zhe_28 7ms1644kbC++23423b2024-06-22 08:57:352024-06-22 08:57:35

详细

Subtask #1:

score: 2
Accepted

Test #1:

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

input:

3 9
3
1
0
2
3
0
1
2

output:

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

result:

ok 

Test #2:

score: 0
Accepted
time: 0ms
memory: 1644kb

input:

3 9
3
1
0
2
3
0
1
2

output:

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

result:

ok 

Test #3:

score: 0
Accepted
time: 0ms
memory: 1552kb

input:

3 9
2
1
0
3
2
0
1
3

output:

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

result:

ok 

Subtask #2:

score: 4
Accepted

Test #4:

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

input:

299 89401
79
1
0
253
77
93
77
0
256
93
0
208
211
208
0
237
68
210
68
0
283
210
0
240
171
240
0
281
140
248
140
0
162
61
162
0
276
10
72
10
0
139
72
0
269
139
0
271
129
271
0
286
2
242
2
0
216
13
216
0
239
13
0
202
112
86
112
0
115
86
0
189
115
0
195
42
96
42
0
284
85
124
85
0
279
124
0
156
218
110
2...

output:

1 1
79 1
-1 79
79 2
253 1
77 1
93 1
-77 93
93 2
256 1
-93 256
256 2
208 1
211 1
-208 211
211 2
237 1
68 1
210 1
-68 210
210 2
283 1
-210 283
283 2
240 1
171 1
-171 240
171 2
281 1
140 1
248 1
-140 248
248 2
162 1
61 1
-61 162
61 2
276 1
10 1
72 1
-10 72
72 2
139 1
-72 139
139 2
269 1
-139 269
269 2
...

result:

ok 

Test #5:

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

input:

300 90000
15
1
0
199
15
0
123
90
123
0
208
11
79
11
0
205
79
0
105
52
75
52
0
209
75
0
76
112
76
0
290
112
0
130
2
17
2
0
53
17
0
70
53
0
225
70
0
254
25
254
0
264
25
0
242
216
242
0
281
134
217
72
192
72
0
270
26
39
26
0
127
39
0
172
89
172
0
234
89
0
135
234
0
247
115
247
0
291
46
74
46
0
159
20
1...

output:

1 1
15 1
-1 15
15 2
199 1
-15 199
199 2
123 1
90 1
-90 123
90 2
208 1
11 1
79 1
-11 79
79 2
205 1
-79 205
205 2
105 1
52 1
75 1
-52 75
75 2
209 1
-75 209
209 2
76 1
112 1
-76 112
112 2
290 1
-112 290
290 2
130 1
2 1
17 1
-2 17
17 2
53 1
-17 53
53 2
70 1
-53 70
70 2
225 1
-70 225
225 2
254 1
25 1
-25...

result:

ok 

Test #6:

score: 0
Accepted
time: 0ms
memory: 1632kb

input:

300 90000
171
1
0
22
57
22
0
250
4
17
4
0
272
17
0
42
139
42
0
130
139
0
199
130
0
244
199
0
286
232
102
232
0
274
102
0
223
274
0
282
134
92
134
0
294
92
0
107
163
13
163
0
184
13
0
207
184
0
206
207
0
217
48
88
38
88
0
280
38
0
186
71
65
14
65
0
297
14
0
103
43
97
43
0
51
46
51
0
247
46
0
265
87
2...

output:

1 1
171 1
-1 171
171 2
22 1
57 1
-22 57
57 2
250 1
4 1
17 1
-4 17
17 2
272 1
-17 272
272 2
42 1
139 1
-42 139
139 2
130 1
-130 139
130 2
199 1
-130 199
199 2
244 1
-199 244
244 2
286 1
232 1
102 1
-102 232
102 2
274 1
-102 274
274 2
223 1
-223 274
223 2
282 1
134 1
92 1
-92 134
92 2
294 1
-92 294
29...

result:

ok 

Test #7:

score: 0
Accepted
time: 6ms
memory: 1620kb

input:

300 90000
176
1
0
135
63
135
0
296
63
0
258
278
178
243
118
40
118
0
239
40
0
180
239
0
268
89
134
89
0
205
134
0
136
205
0
256
136
0
282
91
110
91
0
201
56
20
56
0
161
20
0
147
161
0
235
120
124
23
111
23
0
251
13
238
8
196
8
0
266
196
0
241
81
224
52
224
0
273
52
0
193
86
157
86
0
269
45
2
43
2
0
...

output:

1 1
176 1
-1 176
176 2
135 1
63 1
-63 135
63 2
296 1
-63 296
296 2
258 1
278 1
178 1
243 1
118 1
40 1
-40 118
40 2
239 1
-40 239
239 2
180 1
-180 239
180 2
268 1
89 1
134 1
-89 134
134 2
205 1
-134 205
205 2
136 1
-136 205
136 2
256 1
-136 256
256 2
282 1
91 1
110 1
-91 110
110 2
201 1
56 1
20 1
-20...

result:

ok 

Test #8:

score: 0
Accepted
time: 6ms
memory: 1612kb

input:

300 90000
96
1
0
255
96
0
287
215
267
27
118
27
0
263
77
22
77
0
171
22
0
143
171
0
240
143
0
285
240
0
279
105
190
105
0
279
279
0
285
285
0
190
105
171
22
77
143
263
0
118
118
0
22
77
267
0
215
215
0
118
287
0
27
255
0
96
1
162
1
0
26
162
0
195
26
0
32
104
32
0
189
104
0
136
189
0
256
52
256
0
273...

output:

1 1
96 1
-1 96
96 2
255 1
-96 255
255 2
287 1
215 1
267 1
27 1
118 1
-27 118
118 2
263 1
77 1
22 1
-22 77
22 2
171 1
-22 171
171 2
143 1
-143 171
143 2
240 1
-143 240
240 2
285 1
-240 285
285 2
279 1
105 1
190 1
-105 190
190 2
105 2
-105 279
105 3
279 2
-279 285
279 3
285 3
240 3
143 3
171 3
22 3
77...

result:

ok 

Subtask #3:

score: 0
Wrong Answer

Test #9:

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

input:

299 598
43
1
0
66
43
0
128
66
0
278
128
0
183
141
183
0
236
141
0
201
236
0
296
201
0
263
165
263
0
277
165
0
230
277
0
294
110
153
24
82
24
0
235
9
147
9
0
198
147
0
267
162
111
162
0
250
111
0
202
34
158
34
0
174
142
68
142
0
160
42
160
0
253
42
0
123
136
63
136
0
237
63
0
260
149
227
149
0
177
22...

output:

1 1
43 1
-1 43
43 2
66 1
-43 66
66 2
128 1
-66 128
128 2
278 1
-128 278
278 2
183 1
141 1
-141 183
141 2
236 1
-141 236
236 2
201 1
-201 236
201 2
296 1
-201 296
296 2
263 1
165 1
-165 263
165 2
277 1
-165 277
277 2
230 1
-230 277
230 2
294 1
110 1
153 1
24 1
82 1
-24 82
82 2
235 1
9 1
147 1
-9 147
...

result:

wrong answer Wrong Answer [3]

Subtask #4:

score: 9
Accepted

Test #15:

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

input:

299 89401
29
1
0
122
29
0
59
99
59
0
72
99
0
194
57
194
0
268
57
0
250
9
8
9
0
83
8
0
22
83
0
289
22
0
201
229
201
0
236
138
164
38
90
38
0
212
86
33
86
0
185
33
0
69
185
0
282
69
0
140
214
140
0
252
214
0
248
97
189
97
0
249
189
0
283
163
230
2
153
2
0
298
153
0
227
58
190
58
0
184
190
0
267
184
0
...

output:

1 1
29 1
-1 29
29 2
122 1
-29 122
122 2
59 1
99 1
-59 99
99 2
72 1
-72 99
72 2
194 1
57 1
-57 194
57 2
268 1
-57 268
268 2
250 1
9 1
8 1
-8 9
8 2
83 1
-8 83
83 2
22 1
-22 83
22 2
289 1
-22 289
289 2
201 1
229 1
-201 229
229 2
236 1
138 1
164 1
38 1
90 1
-38 90
90 2
212 1
86 1
33 1
-33 86
33 2
185 1
...

result:

ok 

Test #16:

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

input:

300 90000
28
1
0
209
28
0
49
209
0
237
49
0
176
237
0
247
113
63
113
0
195
63
0
137
184
16
184
0
253
16
0
48
35
48
0
278
27
241
27
0
267
205
227
205
0
279
148
19
12
19
0
132
12
0
162
132
0
201
33
89
33
0
207
70
149
70
0
299
149
0
160
133
92
133
0
245
92
0
104
245
0
290
32
76
15
76
0
298
15
0
293
47
...

output:

1 1
28 1
-1 28
28 2
209 1
-28 209
209 2
49 1
-49 209
49 2
237 1
-49 237
237 2
176 1
-176 237
176 2
247 1
113 1
63 1
-63 113
63 2
195 1
-63 195
195 2
137 1
184 1
16 1
-16 184
16 2
253 1
-16 253
253 2
48 1
35 1
-35 48
35 2
278 1
27 1
241 1
-27 241
241 2
267 1
205 1
227 1
-205 227
227 2
279 1
148 1
19 ...

result:

ok 

Test #17:

score: 0
Accepted
time: 0ms
memory: 1584kb

input:

300 90000
24
1
0
202
24
0
252
96
77
96
0
289
77
0
164
135
164
0
300
135
0
163
296
163
0
292
8
133
8
0
134
60
134
0
274
60
0
185
76
88
76
0
228
38
228
0
261
38
0
221
203
221
0
291
203
0
232
148
216
41
216
0
218
41
0
243
29
243
0
249
29
0
224
235
158
235
0
241
112
196
112
0
266
22
28
22
0
170
28
0
209...

output:

1 1
24 1
-1 24
24 2
202 1
-24 202
202 2
252 1
96 1
77 1
-77 96
77 2
289 1
-77 289
289 2
164 1
135 1
-135 164
135 2
300 1
-135 300
300 2
163 1
296 1
-163 296
296 2
292 1
8 1
133 1
-8 133
133 2
134 1
60 1
-60 134
60 2
274 1
-60 274
274 2
185 1
76 1
88 1
-76 88
88 2
228 1
38 1
-38 228
38 2
261 1
-38 26...

result:

ok 

Test #18:

score: 0
Accepted
time: 0ms
memory: 1580kb

input:

300 90000
107
1
0
238
107
0
244
24
244
0
267
24
0
208
267
0
300
148
35
21
35
0
124
21
0
28
124
0
164
28
0
266
164
0
296
266
0
286
87
37
87
0
94
37
0
233
94
0
113
226
113
0
207
226
0
228
66
192
66
0
245
142
152
142
0
241
39
69
39
0
161
69
0
187
161
0
223
61
30
61
0
287
30
0
243
166
127
156
77
13
77
0...

output:

1 1
107 1
-1 107
107 2
238 1
-107 238
238 2
244 1
24 1
-24 244
24 2
267 1
-24 267
267 2
208 1
-208 267
208 2
300 1
148 1
35 1
21 1
-21 35
21 2
124 1
-21 124
124 2
28 1
-28 124
28 2
164 1
-28 164
164 2
266 1
-164 266
266 2
296 1
-266 296
296 2
286 1
87 1
37 1
-37 87
37 2
94 1
-37 94
94 2
233 1
-94 23...

result:

ok 

Test #19:

score: 0
Accepted
time: 0ms
memory: 1624kb

input:

300 90000
65
1
0
16
21
16
0
61
21
0
86
42
86
0
128
5
81
5
0
80
81
0
124
25
26
25
0
233
26
0
71
15
71
0
259
15
0
225
8
108
8
0
166
96
166
0
257
68
67
52
67
0
105
52
0
154
105
0
300
141
295
87
245
87
0
244
139
78
139
0
146
78
0
185
137
179
116
179
0
253
116
0
148
159
148
0
288
159
0
224
135
115
135
0
...

output:

1 1
65 1
-1 65
65 2
16 1
21 1
-16 21
21 2
61 1
-21 61
61 2
86 1
42 1
-42 86
42 2
128 1
5 1
81 1
-5 81
81 2
80 1
-80 81
80 2
124 1
25 1
26 1
-25 26
26 2
233 1
-26 233
233 2
71 1
15 1
-15 71
15 2
259 1
-15 259
259 2
225 1
8 1
108 1
-8 108
108 2
166 1
96 1
-96 166
96 2
257 1
68 1
67 1
52 1
-52 67
52 2
...

result:

ok 

Test #20:

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

input:

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

output:

1 1
124 1
-1 124
124 2
13 1
-13 124
13 2
180 1
-13 180
180 2
83 1
29 1
-29 83
29 2
274 1
-29 274
274 2
222 1
49 1
-49 222
49 2
236 1
-49 236
236 2
192 1
-192 236
192 2
272 1
110 1
191 1
-110 191
191 2
278 1
-191 278
278 2
217 1
45 1
168 1
-45 168
168 2
126 1
12 1
28 1
-12 28
28 2
43 1
-28 43
43 2
35...

result:

ok 

Test #21:

score: 0
Accepted
time: 0ms
memory: 1600kb

input:

300 90000
107
1
0
224
63
155
63
0
223
155
0
196
3
196
0
210
3
0
44
179
44
0
139
52
139
0
244
52
0
297
77
235
71
204
71
0
84
204
0
239
84
0
170
122
170
0
263
2
151
2
0
123
151
0
276
5
165
5
0
175
74
13
58
13
0
169
58
0
279
169
0
295
38
51
38
0
50
41
50
0
89
41
0
283
89
0
135
113
135
0
232
113
0
228
2...

output:

1 1
107 1
-1 107
107 2
224 1
63 1
155 1
-63 155
155 2
223 1
-155 223
223 2
196 1
3 1
-3 196
3 2
210 1
-3 210
210 2
44 1
179 1
-44 179
179 2
139 1
52 1
-52 139
52 2
244 1
-52 244
244 2
297 1
77 1
235 1
71 1
204 1
-71 204
204 2
84 1
-84 204
84 2
239 1
-84 239
239 2
170 1
122 1
-122 170
122 2
263 1
2 1...

result:

ok 

Test #22:

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

input:

300 90000
38
1
0
50
38
0
162
8
61
8
0
166
61
0
283
166
0
182
197
11
137
11
0
277
137
0
297
29
102
29
0
70
33
70
0
135
33
0
237
135
0
149
97
122
17
122
0
201
17
0
262
201
0
243
32
18
32
0
45
18
0
36
45
0
151
36
0
144
83
144
0
172
14
111
14
0
263
111
0
119
263
0
270
48
108
48
0
271
108
0
198
271
0
284...

output:

1 1
38 1
-1 38
38 2
50 1
-38 50
50 2
162 1
8 1
61 1
-8 61
61 2
166 1
-61 166
166 2
283 1
-166 283
283 2
182 1
197 1
11 1
137 1
-11 137
137 2
277 1
-137 277
277 2
297 1
29 1
102 1
-29 102
102 2
70 1
33 1
-33 70
33 2
135 1
-33 135
135 2
237 1
-135 237
237 2
149 1
97 1
122 1
17 1
-17 122
17 2
201 1
-17...

result:

ok 

Subtask #5:

score: 13
Accepted

Test #23:

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

input:

299 897
140
1
0
288
56
138
56
0
247
123
227
8
227
0
237
8
0
152
15
152
0
207
15
0
110
207
0
240
7
174
7
0
69
131
40
101
40
0
273
101
0
291
242
257
33
197
33
0
233
168
233
0
286
76
222
76
0
285
75
241
75
0
172
241
0
275
10
65
10
0
199
13
117
13
0
278
117
0
193
219
193
0
215
95
176
95
0
217
176
0
268
...

output:

1 1
140 1
-1 140
140 2
288 1
56 1
138 1
-56 138
138 2
247 1
123 1
227 1
8 1
-8 227
8 2
237 1
-8 237
237 2
152 1
15 1
-15 152
15 2
207 1
-15 207
207 2
110 1
-110 207
110 2
240 1
7 1
174 1
-7 174
174 2
69 1
131 1
40 1
101 1
-40 101
101 2
273 1
-101 273
273 2
291 1
242 1
257 1
33 1
197 1
-33 197
197 2
...

result:

ok 

Test #24:

score: 0
Accepted
time: 0ms
memory: 1636kb

input:

300 900
46
1
0
298
46
0
282
18
22
18
0
184
22
0
118
65
118
0
166
65
0
220
129
168
102
15
102
0
252
15
0
251
227
214
174
36
23
36
0
71
7
71
0
240
7
0
136
62
47
62
0
155
47
0
156
155
0
164
156
0
247
80
238
80
0
261
238
0
260
198
115
101
115
0
207
101
0
230
207
0
274
218
151
70
151
0
208
70
0
170
131
1...

output:

1 1
46 1
-1 46
46 2
298 1
-46 298
298 2
282 1
18 1
22 1
-18 22
22 2
184 1
-22 184
184 2
118 1
65 1
-65 118
65 2
166 1
-65 166
166 2
220 1
129 1
168 1
102 1
15 1
-15 102
15 2
252 1
-15 252
252 2
251 1
227 1
214 1
174 1
36 1
23 1
-23 36
23 2
71 1
7 1
-7 71
7 2
240 1
-7 240
240 2
136 1
62 1
47 1
-47 62...

result:

ok 

Test #25:

score: 0
Accepted
time: 0ms
memory: 1628kb

input:

300 900
60
1
0
114
60
0
291
114
0
224
272
62
79
18
79
0
216
18
0
32
151
32
0
150
5
150
0
199
5
0
248
199
0
285
248
0
276
171
20
120
20
0
147
68
147
0
169
68
0
283
169
0
202
121
30
78
30
0
42
78
0
278
42
0
176
11
58
11
0
50
36
50
0
54
36
0
237
54
0
246
231
135
231
0
264
135
0
170
109
10
109
0
188
10
...

output:

1 1
60 1
-1 60
60 2
114 1
-60 114
114 2
291 1
-114 291
291 2
224 1
272 1
62 1
79 1
18 1
-18 79
18 2
216 1
-18 216
216 2
32 1
151 1
-32 151
151 2
150 1
5 1
-5 150
5 2
199 1
-5 199
199 2
248 1
-199 248
248 2
285 1
-248 285
285 2
276 1
171 1
20 1
120 1
-20 120
120 2
147 1
68 1
-68 147
68 2
169 1
-68 16...

result:

ok 

Test #26:

score: 0
Accepted
time: 5ms
memory: 1632kb

input:

300 900
8
1
0
132
8
0
174
13
59
13
0
35
59
0
222
35
0
67
196
67
0
250
106
163
91
163
0
192
91
0
116
192
0
205
116
0
160
19
160
0
260
18
260
0
275
18
0
39
72
26
72
0
208
26
0
166
208
0
264
166
0
218
87
218
0
291
87
0
240
210
104
210
0
254
104
0
299
108
120
108
0
269
105
184
105
0
126
184
0
293
126
0
...

output:

1 1
8 1
-1 8
8 2
132 1
-8 132
132 2
174 1
13 1
59 1
-13 59
59 2
35 1
-35 59
35 2
222 1
-35 222
222 2
67 1
196 1
-67 196
196 2
250 1
106 1
163 1
91 1
-91 163
91 2
192 1
-91 192
192 2
116 1
-116 192
116 2
205 1
-116 205
205 2
160 1
19 1
-19 160
19 2
260 1
18 1
-18 260
18 2
275 1
-18 275
275 2
39 1
72 ...

result:

ok 

Test #27:

score: 0
Accepted
time: 0ms
memory: 1608kb

input:

300 900
94
1
0
20
71
20
0
155
71
0
110
155
0
198
110
0
146
60
146
0
223
60
0
289
56
237
56
0
202
112
142
112
0
163
126
98
99
21
99
0
278
21
0
261
246
125
211
125
0
219
36
159
36
0
37
26
37
0
221
26
0
197
141
171
118
171
0
273
54
194
54
0
148
194
0
263
67
236
57
225
57
0
212
225
0
231
84
231
0
244
84...

output:

1 1
94 1
-1 94
94 2
20 1
71 1
-20 71
71 2
155 1
-71 155
155 2
110 1
-110 155
110 2
198 1
-110 198
198 2
146 1
60 1
-60 146
60 2
223 1
-60 223
223 2
289 1
56 1
237 1
-56 237
237 2
202 1
112 1
142 1
-112 142
142 2
163 1
126 1
98 1
99 1
21 1
-21 99
21 2
278 1
-21 278
278 2
261 1
246 1
125 1
211 1
-125 ...

result:

ok 

Test #28:

score: 0
Accepted
time: 0ms
memory: 1552kb

input:

300 900
4
1
0
36
4
0
171
36
0
47
163
47
0
236
2
179
2
0
143
179
0
209
143
0
186
209
0
237
26
237
0
296
26
0
215
79
32
79
0
229
32
0
111
193
93
20
93
0
285
20
0
295
280
14
280
0
281
14
0
154
56
154
0
288
56
0
202
214
48
18
48
0
59
18
0
40
59
0
182
40
0
217
182
0
235
199
17
62
17
0
23
62
0
118
23
0
88...

output:

1 1
4 1
-1 4
4 2
36 1
-4 36
36 2
171 1
-36 171
171 2
47 1
163 1
-47 163
163 2
236 1
2 1
179 1
-2 179
179 2
143 1
-143 179
143 2
209 1
-143 209
209 2
186 1
-186 209
186 2
237 1
26 1
-26 237
26 2
296 1
-26 296
296 2
215 1
79 1
32 1
-32 79
32 2
229 1
-32 229
229 2
111 1
193 1
93 1
20 1
-20 93
20 2
285 ...

result:

ok 

Test #29:

score: 0
Accepted
time: 0ms
memory: 1588kb

input:

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

output:

1 1
56 1
-1 56
56 2
51 1
-51 56
51 2
128 1
-51 128
128 2
182 1
77 1
80 1
-77 80
80 2
220 1
63 1
19 1
-19 63
19 2
209 1
-19 209
209 2
37 1
-37 209
37 2
214 1
-37 214
214 2
148 1
52 1
55 1
-52 55
55 2
115 1
-55 115
115 2
242 1
69 1
95 1
33 1
-33 95
33 2
295 1
-33 295
295 2
189 1
270 1
181 1
266 1
-181...

result:

ok 

Test #30:

score: 0
Accepted
time: 6ms
memory: 1608kb

input:

300 900
127
1
0
216
25
17
25
0
107
17
0
278
107
0
113
158
82
158
0
273
82
0
110
229
110
0
183
93
183
0
207
59
20
59
0
195
20
0
160
104
160
0
300
104
0
292
94
255
14
9
14
0
83
9
0
164
83
0
297
136
157
15
157
0
243
15
0
193
243
0
275
72
148
72
0
290
148
0
291
282
132
7
39
7
0
44
39
0
78
44
0
60
78
0
1...

output:

1 1
127 1
-1 127
127 2
216 1
25 1
17 1
-17 25
17 2
107 1
-17 107
107 2
278 1
-107 278
278 2
113 1
158 1
82 1
-82 158
82 2
273 1
-82 273
273 2
110 1
229 1
-110 229
229 2
183 1
93 1
-93 183
93 2
207 1
59 1
20 1
-20 59
20 2
195 1
-20 195
195 2
160 1
104 1
-104 160
104 2
300 1
-104 300
300 2
292 1
94 1
...

result:

ok 

Test #31:

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

input:

300 900
96
1
0
180
96
0
192
180
0
276
18
217
18
0
264
19
132
2
7
2
0
248
7
0
156
182
30
93
30
0
243
93
0
196
63
196
0
229
63
0
245
84
245
0
275
84
0
101
38
101
0
231
38
0
70
223
27
45
27
0
253
45
0
288
115
136
115
0
227
136
0
216
227
0
291
216
0
251
56
214
56
0
212
22
138
22
0
26
110
26
0
39
110
0
1...

output:

1 1
96 1
-1 96
96 2
180 1
-96 180
180 2
192 1
-180 192
192 2
276 1
18 1
217 1
-18 217
217 2
264 1
19 1
132 1
2 1
7 1
-2 7
7 2
248 1
-7 248
248 2
156 1
182 1
30 1
93 1
-30 93
93 2
243 1
-93 243
243 2
196 1
63 1
-63 196
63 2
229 1
-63 229
229 2
245 1
84 1
-84 245
84 2
275 1
-84 275
275 2
101 1
38 1
-3...

result:

ok 

Subtask #6:

score: 0
Wrong Answer

Test #32:

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

input:

300 90000
133
1
0
89
133
0
253
88
243
88
0
171
243
0
88
185
135
185
0
250
135
0
150
100
150
0
291
82
2
82
0
47
82
0
2
47
-1

output:

1 1
133 1
-1 133
133 2
89 1
-89 133
89 2
253 1
88 1
243 1
-88 243
243 2
171 1
-171 243
171 2
243 3
185 1
135 1
-135 185
135 2
250 1
-135 250
250 2
150 1
100 1
-100 150
100 2
291 1
82 1
2 1
-2 82
2 2
47 1
-47 82
47 2
82 2
-47 82

result:

wrong answer Wrong Answer [6]

Subtask #7:

score: 0
Wrong Answer

Test #58:

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

input:

300 900
201
1
0
228
1
0
171
10
76
10
0
40
76
0
147
40
0
103
45
103
0
254
45
0
103
296
45
0
170
27
170
0
116
47
116
0
170
170
0
289
116
0
47
27
116
-1

output:

1 1
201 1
-1 201
201 2
228 1
-1 228
228 2
171 1
10 1
76 1
-10 76
76 2
40 1
-40 76
40 2
147 1
-40 147
147 2
103 1
45 1
-45 103
45 2
254 1
-45 254
254 2
45 3
296 1
-45 296
296 2
170 1
27 1
-27 170
27 2
116 1
47 1
-47 116
47 2
116 2
-116 170
116 3
289 1
-116 289
289 2
116 4
170 2
-116 170

result:

wrong answer Wrong Answer [6]

Subtask #8:

score: 0
Wrong Answer

Test #84:

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

input:

299 598
86
1
0
94
1
0
224
94
0
240
84
172
30
127
30
0
285
127
0
212
73
95
73
0
212
212
0
285
285
0
95
238
12
238
0
150
35
150
0
173
74
173
0
137
173
0
74
137
-1

output:

1 1
86 1
-1 86
86 2
94 1
-1 94
94 2
224 1
-94 224
224 2
240 1
84 1
172 1
30 1
127 1
-30 127
127 2
285 1
-127 285
285 2
212 1
73 1
95 1
-73 95
95 2
73 2
-73 212
73 3
212 2
-212 285
212 3
285 3
238 1
12 1
-12 238
12 2
150 1
35 1
-35 150
35 2
173 1
74 1
-74 173
74 2
137 1
-137 173
137 2
173 2
-137 173

result:

wrong answer Wrong Answer [6]