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

2788
3442
2339
2304
3155
2747
2678
2842
3662
2854
2663
2588
3150
2053
3812
2545
2392
3248
2958
3287
1651
2470
2293
2262
2722
2788
3059
2572
2581
2522
2412
2879
2852
1989
1392
2740
3034
3441
2632
3225
1478
3365
3213
2532
3508
3169
1739
2839
2775
2759
2647
2641
2424
3196
2664
2799
2887
2462
2768
2680
3211
2388
3414
1167
2772
2865
2629
2275
3022
3456
2371
3042
3462
2527
3121
2896
3078
2915
1214
2337
1276
1054
2316
3215
1137
2538
2645
2751
2835
2213
2394
2202
2573
2997
3580
2842
2461
3574
2112
2808
2896
2447
3168
2332
3420
2506
2944
2508
2122
2134
4165
2369
3473
2314
3639
2089
2871
2977
2797
2556
2706
3247
2801
2471
1761
2996
2579
2416
2294
3507
3293
3437
3258
2395
2208
3110
2646
1297
2667
2396
1726
2130
2353
2275
2497
3042
3144
2125
3277
2572
3170
3139
2233
2577
2673
2755
2726
2776
3026
2444
2125
2864
3010
2072
2518
2571
2322
2905
2166
3296
2791
2218
1918
2455
2128
3205
1863
3482
2532
2172
2894
2390
3509
2210
2417
2384
2664
2496
2564
2088
2532
2326
2218
3527
2390
2393
2351
1552
1279
2862
2544
2316
1322
3728
2678

JOJ Answer

-106
-86
-102
-105
1028
864
-84
865
853
982
-12
1431
996
908
1135
-13
-42
1066
897
939
945
-14
-136
877
1060
915
-29
1930
862
2060
-49
918
920
-9
1012
933
-117
899
-56
-119
864
-120
864
964
887
889
-94
-116
-136
956
1701
-51
-24
-27
-8
941
968
-25
-24
-118
936
2049
877
-98
-50
-14
-30
871
997
868
1089
-124
894
-60
944
968
928
888
1001
-11
878
856
-106
-55
940
883
-171
924
-38
-75
1644
-70
1739
-55
852
876
-70
1155
-91
1044
968
955
929
955
1183
1427
958
-33
-65
859
891
-153
-15
927
-73
-44
860
861
940
1048
885
903
1722
-65
904
880
-24
911
958
939
909
945
955
903
-80
906
985
-93
1004
858
-41
-25
968
-43
1095
908
901
942
976
-38
-12
-72
1930
-97
-22
880
901
-111
-103
1045
-56
917
1689
990
-162
-41
922
953
1026
-24
1807
-38
1335
948
997
-91
1059
844
909
941
-15
-114
-118
1029
-81
975
867
855
-48
876
906
-94
1052
-129
969
1727
1065
-43
981
885
-90
-118
1008
-36
937
876
987
1360
-14
896
1020
-89
936
-82
884
928
-68
-64
984
-106
942
-42
953
860
1265
-33
-16
-152
-120
891
-8
930
890
838
1947
854
1052
908
2129
-23
996