my Hardest B ever
this problem killed me... can anyone help me with it ?
ICPC NA North Central and South Division