Lightoj 1021
Can Anyone give the idea for the following Problem LOJ — 1021 Painful Bases
ICPC NA North Central and South Division