my Hardest B ever
this problem killed me... can anyone help me with it ?
Atcoder ABC #354 Solution Discussion