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

3
2
4
4
3
2
4
3
2
4
-200
3
2
4
-200
3
2
4
-200
-200
4271490
-200
3
2
4
7529911
4271490
4271490
4271490
-200
4271490
-200
3
2
4
7529911
4271490
4271490
-200
3
2
4
7529911
9873986
7292560
4271490
-200
-200
-200
-200
3
2
4
7529911
9873986
7292560
3507433
4271490
9873986
9873986
-200
-200
3
2
4
7529911
9873986
7292560
3507433
4271490
9873986
-200
-200
3
2
4
7529911
9873986
7292560
3507433
3086496
4271490
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
3086496
4271490
-200
-200
3
2
4
7529911
9873986
7292560
3507433
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
4271490
-200
-2

JOJ Answer

3
2
4
4
3
2
4
3
2
4
-200
3
2
4
-200
3
2
4
-200
-200
4271490
-200
3
2
4
7529911
4271490
4271490
4271490
-200
4271490
-200
3
2
4
7529911
4271490
4271490
-200
3
2
4
7529911
9873986
7292560
4271490
-200
-200
-200
-200
3
2
4
7529911
9873986
7292560
3507433
4271490
9873986
9873986
-200
-200
3
2
4
7529911
9873986
7292560
3507433
4271490
9873986
-200
-200
3
2
4
7529911
9873986
7292560
3507433
3086496
4271490
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
3086496
4271490
-200
-200
3
2
4
7529911
9873986
7292560
3507433
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
-200
3
2
4
7529911
9873986
7292560
3507433
7381693
3086496
4271490
4271490
-200
-2