Need help for CHFICRM ...(probably some io problem)

I am solving the question CHFICRM link :- https://www.codechef.com/problems/CHFICRM
When I run it in my pc with g++ it runs fine …
but here when i click run it shows my program went into an infinite loop …!
Can someone tell me what am i doing wrong.
If its a problem with my logic then just mention that coz I think some io problem is there.
code link - https://www.codechef.com/viewsolution/34548122

for input :
1
3
10 15 15

your program prints “NO” two times.

1 Like

Ohhhh thank you so much … It all worked now …