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

121
86
19
107
72
80
94
81
119
80
130
62
120
156
71
23
35
98
74
139
88
26
116
41
93
22
32
87
63
120
116
109
15
157
149
104
139
117
17
57
105
77
113
93
123
99
111
149
89
130
33
64
97
133
99
112
86
68
72
42
101
73
26
81
152
77
141
65
156
104
90
91
147
144
74
127
82
50
146
132
109
86
96
108
82
84
58
71
28
123
80
13
135
98
67
61
30
59
74
110
47
30
128
66
99
58
3
79
69
144
59
152
156
64
23
98
115
98
131
96
90
103
121
152
133
26
69
130
39
103
108
59
52
112
69
128
41
78
140
69
30
72
119
48
58
59
102
69
45
52
126
73
83
111
123
92
92
31
138
53
145
117
78
120
96
64
95
114
84
55
148
75
64
144
75
95
71
61
105
132
68
111
51
129
99
62
116
84
18
100
42
128
57
69
132
36
23
127
92
58
54
53
95
70
83
105
71
121
72
33
88
126
31
61
44
65
112
87
148
9
106
80
69
80
80
111
78
100
66
93
86
140
70
137
84
104
92
125
76
106
135
139
110
95
70
54
51
92
50
95
57
75
50
88
101
95
118
92
122
70
127

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