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

242
139
194
135
311
206
109
330
253
223
67
189
282
200
215
346
207
232
132
134
134
237
216
118
234
228
101
153
125
205
168
168
50
151
70
351
178
243
105
211
203
227
221
243
217
207
236
175
209
328
233
110
279
274
374
160
217
90
277
245
106
190
60
179
286
244
342
206
153
71
260
127
353
231
289
170
252
247
128
126
150
222
139
166
135
255
184
60
297
246
304
212
240
171
102
54
227
220
88
169
170
248
138
81
112
246
270
44
241
300
164
197
153
191
133
251
227
160
56
326
225
201
237
251
290
32
78
40
215
191
82
352
300
90
191
168
233
229
366
57
208
152
76
130
263
181
213
130
307
153
218
237
211
224
357
233
113
170
225
158
141
247
51
357
197
316
319
221
194
235
134
278
274
266
237
120
192
172
167
27
311
162
225
190
131
40
122
221
321
111
138
163
167
194
127
232
229
181
104
283
117
225
246
299
329
209
157
252
345
218
345
216
161
154
104
161
234
300
159
223
74
143
296
210
335
135
305
172
230
214
277
366
154
279
161
252
240
140
209
121
120
143
211
201
89
105
216
213
183
232
177
200
100
155
176
272
253
42
233
172
150
301
1

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