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

I am solving the question CHFICRM link :- CHFICRM Problem - CodeChef
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 - CodeChef: Practical coding for everyone

for input :
1
3
10 15 15

your program prints “NO” two times.

1 Like

Ohhhh thank you so much … It all worked now …