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, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.

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

Your Answer

52
1372
0 2 1699
0 4 5428
0 5 883
0 7 2165
0 10 4666
0 12 2469
0 14 6834
0 16 6558
0 17 7992
0 19 8188
0 20 482
0 21 -1
0 26 5179
0 29 4212
0 32 4649
0 33 530
0 34 5049
0 35 1384
0 40 4882
0 42 618
0 43 1934
0 44 1397
0 46 3465
0 47 5622
0 50 3064
1 0 1491
1 2 1195
1 3 770
1 6 1448
1 9 4303
1 11 8104
1 14 -7
1 17 6512
1 21 4797
1 22 2671
1 23 3387
1 27 1056
1 29 2878
1 30 4795
1 31 3899
1 32 1083
1 35 69
1 36 8769
1 37 458
1 38 8058
1 40 4594
1 42 2984
1 43 0
1 44 2679
1 49 5063
1 50 8523
1 51 486
2 0 6316
2 3 4474
2 4 3427
2 5 6951
2 6 -7
2 7 4834
2 8 2368
2 12 2997
2 13 5016
2 16 7373
2 20 1283
2 24 635
2 25 6933
2 28 3068
2 29 5368
2 34 0
2 35 6094
2 39 2920
2 41 6550
2 42 7328
2 43 4520
2 44 4128
2 45 1358
2 49 1461
2 50 5180
2 51 2779
3 0 6451
3 1 31
3 4 6179
3 5 598
3 8 -6
3 9 -1
3 10 2553
3 11 2634
3 12 2106
3 13 6195
3 14 3461
3 15 6687
3 17 5941
3 18 2884
3 19 2632
3 22 1717
3 23 3846
3 24 4190
3 26 318
3 27 -5
3 29 2269
3 30 7086
3 32 492
3 37 3508
3 40 3193
3 41 5876
3 46 2016
3 48 8653
3 50 4681
4

JOJ Answer

187
109
369
385
626
108
5
3
279
606
266
467
774
370
-12
130
585
312
36
464
288
308
526
60
344
192
208
775
316
-10
106
414
75
775
492
229
347
465
117
271
302
372
788
794
192
1034
321
399
248
37
400
468
529
151
126
380
6
22
29
355
372
524
825
472
418
298
423
358
1129
109
170
140
365
412
159
35
735
306
1199
111
176
61
64
394
108
567
716
235
302
1496
1262
435
151
87
700
352
495
141
61
202
67
464
329
626
1101
-2
531
-8
665
115
327
1291
38
108
479
139
550
316
563
477
333
23
288
407
316
233
-5
351
1104
1441
35
564
81
3
288
1628
152
85
186
79
59
863
173
1248
373
206
1272
571
569
45
-6
85
384
225
494
1174
173
145
-8
134
174
132
124
462
471
-8
567
-2
463
55
1029
469
417
100
69
61
540
232
1358
320
305
61
48
87
46
328
454
411
278
427
137
543
459
498
206
170
469
148
166
624
308
419
1075
135
106
57
342
172
66
352
238
233
-4
41
384
1131
111
406
329
263
342
17
-8
217
982
345
-1
615
471
1358
145
305
823
409
205
43
906
369
552
375
215
260
239
144
296
348
192
70
178
164
549
406
361
243
-3
233
230
312
0
251
73
520
478
802
118
74