Could anyone tell which testcase is being failed by my code for this question (INFERNO)

I want to know a testcase where my code is going wrong but I cant see it ,
Question code is INFERNO from STARTERS 37 . And also what is the error and how to rectify it .

The link to my solution is CodeChef: Practical coding for everyone

1
1 2
4

Expected 2, got 1.