unable to find problem why this code is not running for last test case.. Execution doesnt get terminated for one test case..Pls help me out.

link for my Question is https://www.codechef.com/problems/SPAMCLAS

link for my Solution which is not running https://www.codechef.com/viewsolution/20952029

test case:
3 2 1000000000
2 4
2 2
5 4

output is not comming in my system.

try using var i in your loop as long long int, as maxx can go upto 10^9 so can variable in your loop which is declared as an int.

Thanks for Your Reply…
https://www.codechef.com/viewsolution/20957545

still I am facing same issue.