Rain water trapping@no output

https://ide.codingblocks.com/s/45692
https://hack.codingblocks.com/contests/c/512/1300

it is working fine if i remove test case loop, but not with the loop.

Hey Ayush, you have not taken input for test case t, you have just declared a variable t in your code.

1 Like

in you line number 32 you have to again declare int i in for loop, in your code it is taking the above value of i so it is running only once.

1 Like