Solve first four tasks of round 213 at codeforces