Can't find the error in my approach

I am getting WA in 1 test case and I can’t what is wrong in my approach.

hello @aakash47

pls share ur code using cb ide

go to this link -> https://ide.codingblocks.com/
paste ur code in the editor, press ctrl + s and then save
a url will be generated in ur search bar share that url with me

ss

read the input format carefully, u dont have to frame logic for 100 cell board, instead u are given number of cells with snakes and ladders.
u need to wrtie algorithm specific to this input.

check this->

The first line contains the number of tests, T. T testcases follow. For each testcase, the first line contain N(Number of ladders) and after that N line follow. Each of the N line contain 2 integer representing the starting point and the ending point of a ladder respectively. The next line contain integer M(Number of snakes) and after that M line follow. Each of the M line contain 2 integer representing the starting point and the ending point of a snake respectively.

Input given in the question is this

https://hack.codingblocks.com/app/contests/2175/385/problem

are u solving this problem right?

yes, I am solving the problem

check now->

there are two problems with same name.

ok, I missed that case. in which answer is -1. Thanks bro.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.