You can see my solution here and i can assure you that it is running correct on every possible test case . CodeChef: Practical coding for everyone
You can see my solution here and i can assure you that it is running correct on every possible test case . CodeChef: Practical coding for everyone