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

272 16
-10
2 17
181
7 10
45
15 23
-57
16 18
205
10 9
349
12 16
5
21 4
909
18 5
175
12 5
4
16 5
292
22 4
229
20 22
-48
22 1
1324
14 23
-6
17 9
319
15 6
10
20 9
169
5 1
1084
2 1
1358
15 13
-17
24 7
801
18 13
154
16 21
172
15 23
-57
14 19
308
2 23
213
21 19
1173
14 17
-25
26 2
698
15 18
-83
7 26
45
14 11
375
1 12
340
5 25
275
1 20
1817
9 19
276
1 7
846
23 10
205
3 15
551
0 25
750
3 0
1301
2 6
280
19 7
988
5 17
-80
21 10
1041
5 21
-120
17 12
692
2 14
219
10 6
378
7 11
244
12 13
-17
16 25
274
17 16
343
13 6
47
21 19
1173
26 4
607
4 2
104
21 11
1240
20 25
379
23 7
845
22 26
260
4 23
-37
25 0
777
22 10
361
5 24
-40
2 16
-10
16 20
2011
25 24
-22
9 12
373
15 26
112
3 2
514
14 2
135
16 5
292
0 9
452
5 21
-120
18 2
167
9 5
111
6 21
-18
4 23
-37
21 0
1382
23 26
192
4 8
867
8 17
-114
8 19
232
14 12
405
12 13
-17
24 25
328
11 16
-19
7 11
244
2 16
-10
6 13
81
19 14
185
23 22
-68
16 4
281
7 21
-183
16 15
301
21 25
1195
15 21
-116
10 24
332
23 8
927
20 6
110
5 0
759
14 6
61
17 0
1101
7 15
-67
3 9
519
16 1
1376
22 4
229
21 8
1

JOJ Answer

-10
181
45
-57
205
349
5
909
175
4
292
229
-48
1324
-6
319
10
169
1084
1358
-17
801
154
172
-57
308
213
1173
-25
698
-83
45
375
340
275
1817
276
846
205
551
750
1301
280
988
-80
1041
-120
692
219
378
244
-17
274
343
47
1173
607
104
1240
379
845
260
-37
777
361
-40
-10
2011
-22
373
112
514
135
292
452
-120
167
111
-18
-37
1382
192
867
-114
232
405
-17
328
-19
244
-10
81
185
-68
281
-183
301
1195
-116
332
927
110
759
61
1101
-67
519
1376
229
1763
5
-65
288
212
280
344
110
1772
348
171
1259
152
434
420
-64
1426
-48
139
24
779
218
-116
801
45
106
1324
867
1358
480
232
210
154
595
864
1324
212
24
405
292
311
1318
1108
106
234
1022
252
41
88
1698
126
5
577
179
607
85
801
2337
618
-111
373
-102
498
-173
252
1
132
-32
-215
98
-51
6
435
128
466
93
739
226
-48
-46
162
1088
642
18
279
108
74
455
861
1181
88
555
9
896
493
413
232
121
76
257
493
7
184
1719
240
-20
279
27
30
24
55
219
1028
-69
761
24
1656
-65
857
252
1832
132