Some solutions of the algorithmic problems from SPOJ (http://www.spoj.com/)