I dont know in what condition my answer will give WA???
Try this as the input to your code:
1
4 6 1 2
1 Like
1
2 5 1 5
for the new code.
Try this as the input to your code:
1
4 6 1 2
1
2 5 1 5
for the new code.