Connected Component DP - Preparation to IOI Part 5