Solutions of the Yandex algorithm contest