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, the main problem you meet now is Time Exceeded. And the exit code of your program is -9, which should be 0.

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

Your Answer

20
0
328,0
INF
2,3261
0
0,4
INF
9178,0
INF
5,8556
0
0,6
INF
3459,0
INF
7,4942
0
0,8
INF
5806,0
INF
9,6173
0
0,11
INF
3150,0
INF
12,6751
0
0,13
INF
2435,0
INF
14,851
0
0,15
INF
2636,0
INF
16,657
0
0,17
INF
7084,0
INF
18,1431
0
1,0
INF
8663,1
INF
2,633
0
1,3
INF
8686,1
INF
4,1099
0
1,5
INF
1520,1
INF
6,2051
0
1,7
INF
7475,1
INF
8,3356
0
1,10
INF
215,1
INF
12,563
0
1,13
INF
8213,1
INF
14,151
0
1,15
INF
2320,1
INF
16,8669
0
1,17
INF
5876,1
INF
19,4725
0
2,0
INF
828,2
INF
1,7063
0
2,3
INF
4799,2
INF
4,781
0
2,5
INF
2177,2
INF
6,968
0
2,7
INF
2004,2
INF
8,5356
0
2,9
INF
767,2
INF
10,9113
0
2,11
INF
3576,2
INF
12,3265
0
2,13
INF
3182,2
INF
14,2621
0
2,15
INF
7859,2
INF
16,1527
0
2,17
INF
4441,2
INF
18,8590
0
2,19
INF
1780,3
INF
1,8837
0
3,2
INF
6872,3
INF
4,9486
0
3,5
INF
9226,3
INF
6,2763
0
3,8
INF
6166,3
INF
9,1359
0
3,10
INF
8694,3
INF
12,2607
0
3,13
INF
1427,3
INF
14,9215
0
3,15
INF
231,3
INF
16,2168
0
3,17
INF
8865,3
INF
18,8
INF
3,19
INF
1548,4
INF
1,5345
0
4,2
INF
2772,4
INF
3,7251
0
4,5
INF
6428,4
INF
6,85
0

JOJ Answer

1593
695
852
911
497
2547
1796
1957
1472
1454
941
763
2067
2130
1389
980
1346
391
1680
1094
760
620
2894
151
919
1071
2643
650
432
1476
2288
1280
1659
854
2002
1035
850
1181
1331
851
2374
1687
3220
2341
1156
1859
1039
1469
856
8
1248
919
1405
2172
1365
866
3674
1863
2044
1796
1980
2676
38
1661
1315
1059
1360
198
701
480
1896
2567
1770
1519
3714
650
2461
3065
3054
851
2004
1636
2172
896
899
1695
1099
1551