my Hardest B ever
this problem killed me... can anyone help me with it ?
Codeforces Educational Round 167 Solution Discussion (with Shayan)