I was trying to submit this problem after ensuring the 4 test cases given in the problem, but I found it gives wrong answer in test 4. however, this test case I try it, and I'm sure my program output the correct answer
in the fourth test case
the answer is -1 and my program actually output -1, but in the submission it said my output is :
could anyone explain why !!