Hello guys , Firstly I would like to wish you all Happy New Year. I am facing some problem in this question https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=606 I would really request if some one could provide me some tips on the question. My code that got WA is this https://ideone.com/LiUclc Thanks for the help in advance !