Solves for tasks from codeforces