Codeagon graph question

how to solve the first problem ??

check this thread for all questions :- CodeAgon 2020 discussion thread. [Problems added] - Codeforces

1 Like