• + 1 comment

    The sample output in the description is wrong! The correct output is 3 and not 2.

    The testcases contain the same example and there the output is correct.

    Also the formulation " the maximum number of distinct skill set that can the people of country learn" is very misleading. What is meant "the maximum number of distinct skill that are known by at least one person". This means you must count people that already knew a skill at the beginning and thus did not learn anything during the transformations.