Solutions to problems in SPOJ