Solutions to all problems on SPOJ