SPOJ-Submissions Please use the solutions for guidance only and submit your own. Profile: www.spoj.com/users/abatchy/