Cses Problem Set Solutions Codeforces Contest 291