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

INF
944
352
INF
2665
5575
INF
6898
INF
2222
382
-2147470448
2856
6405
INF
1303
3994
1458
1745
593
5890
INF
6040
1831
2938
5675
INF
904
INF
1591
3781
2913
INF
8139
1331
8993
3599
1177
INF
5096
INF
4470
312
INF
3444
8777
491
1331
950
INF
86
9321
6102
499
INF
2350
8411
6121
1510
6245
9128
4192
6375
INF
INF
INF
5965
INF
6120
INF
INF
5911
6551
9151
3113
1771
7452
3248
INF
INF
3269
9185
4489
2389
4502
5153
INF
96
2813
7436
842
7259
INF
3188
INF
INF
8971
INF
INF
8048
4906
-2147477300
2776
2403
7871
7475
8141
6034
INF
715
6824
324
2561
5372
3418
9090
8460
3188
7360
7907
593
7633
7029
3826
2201
904
8026
INF
882
INF
INF
INF
8557
947
235
744
6967
9145
8343
8182
467
8207
1849
1127
1102
7763
9259
3581
1960
8902
9197
4192
237
890
INF
761
104
7136
9337
2075
3350
4966
INF
177
4331
INF
8357
INF
7960
9399
INF
6101
3134
INF
4857
8099
3481
-2147475711
INF
260
208
3929
62
5079
9138
906
6354
9211
926
9231
INF
9270
4147
4544
INF
3598
INF
3925
3151
INF
INF
INF
INF
9287
7434
7239
54
7361
7323
7907
5039
5710
1116
INF
2745
2159
2350
22

JOJ Answer

474
657
352
251
590
322
462
842
582
720
352
794
473
585
584
1251
676
826
896
391
541
574
685
759
843
567
757
721
245
967
236
621
413
734
494
1450
806
920
764
830
448
593
312
532
513
719
491
494
745
669
86
637
622
499
350
596
436
1442
1071
674
389
581
1013
676
579
629
843
654
2023
218
370
1317
529
660
865
873
768
475
740
637
710
533
741
443
499
460
579
96
689
397
419
657
392
656
179
452
431
473
694
654
369
336
1556
548
1618
638
296
874
585
715
188
324
847
811
413
415
453
656
509
446
416
390
559
840
460
904
407
669
520
584
766
334
514
604
235
731
447
491
1120
802
467
283
321
267
331
464
414
479
487
579
553
581
237
418
875
647
104
985
138
774
1074
343
548
177
397
574
720
804
286
479
429
400
235
525
792
699
599
408
485
260
208
539
62
445
440
861
600
368
822
488
551
481
503
357
421
798
597
1006
440
730
299
588
423
530
654
618
54
761
931
979
631
507
816
452
742
762
596
600
572
459
702
218
817
155
353
250
740
682
358
531
716
372
736
783
641
636
104
630
325
684
432
702
530
675
300
360
580
341
608
423
382
760
757
501