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
1967
INF
4159
INF
6773
INF
INF
2569
155
831
2615
INF
INF
1931
6722
INF
9465
4063
INF
5631
INF
8876
INF
6493
8078
6700
INF
INF
INF
8013
8438
3747
INF
3876
6339
INF
3271
871
1387
INF
249
-2147482270
8231
5259
9017
INF
4132
INF
8311
INF
INF
3192
2095
1416
9109
INF
2394
4724
6730
7532
5399
2427
4531
282
937
1235
8611
INF
1862
INF
360
5843
3237
INF
2764
INF
INF
4489
2650
INF
8210
3515
INF
8737
INF
INF
1948
2656
935
1737
2787
4110
3722
7592
INF
774
INF
400
INF
1571
3954
3007
9458
INF
INF
INF
5323
INF
INF
6250
8994
INF
7358
6535
1619
1916
5963
1396
INF
5046
8712
INF
INF
INF
700
3722
4389
INF
2664
5723
7753
INF
2763
2775
1084
6652
1535
2422
INF
3690
1912
2230
9116
INF
2760
4616
4065
INF
INF
-2147483365
2684
INF
2732
INF
2818
INF
1967
INF
2188
INF
INF
9244
8604
3584
INF
INF
INF
-2147483365
INF
INF
1178
INF
INF
4028
8897
1225
INF
INF

JOJ Answer

1289
774
723
747
1007
652
365
722
805
155
831
544
706
361
764
514
882
1046
1045
885
441
1419
753
913
535
638
806
685
946
695
1257
629
1441
1400
833
589
824
612
864
727
955
249
414
824
800
691
475
774
913
638
687
353
940
1051
663
1171
670
813
345
655
718
271
951
619
745
386
433
644
759
320
762
360
710
1009
539
860
637
1216
603
1493
361
1485
998
297
659
432
775
739
603
935
1494
720
591
477
566
609
448
907
400
574
647
689
651
821
1058
678
439
693
668
748
825
437
617
705
776
588
1092
716
749
639
524
914
492
1200
849
700
477
650
774
459
673
695
621
788
857
757
742
457
662
762
1099
733
692
989
758
614
255
654
855
824
479
402
674
966
440
726
1016
367
519
1058
640
576
217
797
931
869
394
625
611
1169
427
498
527
874
314
646
749
817
768