Solutions to programming problems at SPOJ that I've attempted