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

464
INF
486
INF
95
INF
INF
INF
INF
454
157
252
458
INF
INF
236
0
INF
228
INF
162
157
INF
INF
INF
591
INF
INF
14
297
INF
655
INF
336
INF
147
649
324
INF
525
653
347
347
INF
INF
INF
214
946
INF
454
382
INF
INF
21
263
INF
INF
INF
339
91
114
626
2812
698
INF
303
INF
181
-3
439
255
INF
INF
INF
INF
757
INF
INF
728
459
INF
454
216
INF
INF
INF
INF
INF
465
340
INF
INF
INF
727
396
551
INF
INF
INF
INF
226
675
INF
278
INF
INF
277
INF
214
205
INF
INF
INF
356
INF
429
INF
159
425
369
37
INF
INF
512
INF
684
209
381
INF
INF
INF
INF
INF
INF
INF
428
INF
238
159
1033
INF
INF
INF
INF
385
899
210
INF
INF
INF
213
1259
979
543
402
74
630
991
329
655
329
657
557
831
169
INF
53
479
INF
687
INF
217
488
206
INF
INF
400
948
533
590
INF
INF
645
INF
INF
198
INF
INF
INF
1474
INF
INF
INF
INF
219
96
INF
454
100
INF
601
INF
267
INF
815
209
INF
993
378
675
INF
178
INF
INF
55
INF
84
INF
918
170
796
577
390
211
549
1193
INF
INF
INF
453
INF
INF
INF
INF
INF
625
152
INF
114
INF
629
127
INF
INF
874
INF
71
INF
569
INF
INF
INF
INF
141
393
INF
401
385
I

JOJ Answer

166
248
205
182
32
249
27
590
184
408
8
245
322
6
70
153
0
67
135
113
162
82
191
113
509
91
248
158
14
121
149
168
232
121
105
129
179
231
365
190
424
235
235
155
165
144
147
209
169
188
89
233
140
21
75
161
204
89
290
77
114
165
308
155
201
303
237
134
-3
229
110
199
145
219
180
236
344
503
269
306
157
408
187
174
278
440
184
172
252
291
357
237
196
277
213
158
149
303
219
208
226
130
125
163
317
299
128
185
214
205
507
159
342
138
128
294
170
159
159
255
37
160
243
243
419
204
209
252
134
99
83
278
57
147
165
219
229
100
159
187
139
139
442
136
6
168
194
204
214
163
166
156
292
201
160
74
315
351
193
313
189
152
214
161
169
119
53
174
197
254
90
217
88
119
319
206
206
322
191
129
118
244
162
362
152
198
-6
115
173
112
175
298
213
283
176
96
274
153
100
167
595
256
143
432
534
209
205
190
229
332
107
178
80
5
55
200
84
95
518
115
498
243
252
201
549
443
224
99
156
137
119
120
115
230
101
460
133
153
114
260
184
127
276
352
270
88
71
203
173
70
266
129
197
47
340
56
137
317
98
275
128
309
205
333
386
207
283