solutions for some problems from http://acm.timus.ru/