Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr


        

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Time Exceeded. And the exit code of your program is -9, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

Edge: 011179
Edge: 021125
Edge: 032171
Edge: 062670
Edge: 085174
Edge: 09579
Edge: 0105039
Edge: 0117102
Edge: 0142313
Edge: 0165264
Edge: 0171808
Edge: 0187255
Edge: 0203595
Edge: 0215907
Edge: 0235578
Edge: 0286945
Edge: 0321912
Edge: 0342231
Edge: 0352992
Edge: 0363823
Edge: 0372440
Edge: 0381578
Edge: 0397212
Edge: 0406984
Edge: 0413727
Edge: 044302
Edge: 0505192
Edge: 0515196
Edge: 0545109
Edge: 0556741
Edge: 0582000
Edge: 0591246
Edge: 0615430
Edge: 0625555
Edge: 0634836
Edge: 064849
Edge: 0667336
Edge: 0672582
Edge: 070371
Edge: 0744881
Edge: 0754044
Edge: 0798864
Edge: 0832140
Edge: 0855593
Edge: 0925450
Edge: 094620
Edge: 0968988
Edge: 0985937
Edge: 01008136
Edge: 01019372
Edge: 01028597
Edge: 10439
Edge: 144606
Edge: 156546
Edge: 165169
Edge: 191985
Edge: 1102418
Edge: 1122951
Edge: 1137575
Edge: 1158151
Edge: 11821
Edge: 1213754
Edge: 1231081
Edge: 124189
Edge: 1252043
Edge: 1287641
Edge: 1346326
Edge: 1364312
Edge: 1417537
Edge: 144867
Edge: 1487708
Edge: 150807
Edge: 1521536
Edge: 1545192
Edge: 1

JOJ Answer

338
174
851
407
530
215
646
219
321
249
351
275
116
155
290
268
558
1021
310
398
239
160
154
330
152
441
259
213
131
98
335
171
257
278
140
53
181
92
127
225
98
561
436
225
374
109
227
286
421
137
249
213
200
203
229
362
129
164
416
265
178
192
111
378
279
670
233
520
193
201
405
166
182
251
201
244
217
467
248
724
134
161
36
307
148
123
201
314
-18
511
243
161
107
244
243
112
332
373
100
94
183
639
229
60
206
154
247
230
111
171
84
273
115
186
655
115
95
341
156
143
298
352
199
168
219
140
810
265
342
257
193
378
278
539
219
639
212
82
448
127
263
147
527
77
642
524
230
69
313
272
352
362
712
78
358
670
346
387
283
266
113
211
169
103
109
246
180
180
324
293
279
231
225
171
94
531
54
91
160
304
217
245
129
241
247
267
325
46
146
19
337
376
168
180
181
178
333
102
454
421
377
247
674
286
222
99
201
64
-2
595
157
235
201
187
176
190
240
124
152
40
126
216
615
281
279
260
236
166
527
229
414
61
201
406
197
236
240
265
51
203
304
184
241
365
138
177
451
345
86
891
203
674
192
172
271
382
303
158
393
179
302
213