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
2804
INF
8148
INF
INF
INF
INF
2274
1913
6170
5892
INF
INF
236
0
INF
5871
INF
162
4367
INF
INF
INF
3871
INF
INF
2582
6527
INF
4026
INF
5013
INF
8163
1454
4404
INF
1080
5313
983
983
INF
INF
INF
546
6049
INF
6626
2364
INF
INF
21
8850
INF
INF
INF
9091
3407
5950
8562
9030
7202
INF
975
INF
3499
1073741820
2130
2576
INF
INF
INF
INF
1054
INF
INF
7510
1182
INF
2274
216
INF
INF
INF
INF
INF
1543
7134
INF
INF
INF
7282
8244
551
INF
INF
INF
INF
4466
2510
INF
2002
INF
INF
4536
INF
4764
4474
INF
INF
INF
7470
INF
2774
INF
3571
1081
1294
1226
INF
INF
4051
INF
7022
2045
6812
INF
INF
INF
INF
INF
INF
INF
5788
INF
5049
6813
8010
INF
INF
INF
INF
4194
4212
2901
INF
INF
INF
6226
6388
2149
1376
5709
872
8741
5209
4371
3745
2411
1537
7226
3671
7607
INF
6496
479
INF
8648
INF
2081
1833
2220
INF
INF
720
6304
7410
6808
INF
INF
1491
INF
INF
6061
INF
INF
INF
7947
INF
INF
INF
INF
3237
220
INF
1226
600
INF
2456
INF
2157
INF
6997
1334
INF
5618
2450
2088
INF
5116
INF
INF
6372
INF
8921
INF
978
3075
796
5675
6998
4781
5083
5271
INF
INF
INF

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