My take on the solving of problems on spoj.com