Editorial request for BFF'S- CODEJAM

dfs
dsu
friend
graph

#1

I have problem solving a problem from codejam round 1A-

Link to problem:- https://code.google.com/codejam/contest/4304486/dashboard#s=p2

Can anyone please write editorial to this problem and please tell whats the strategy to approach to solve this kind of problem.

Any help would be appreciated, thanks in advance.


#2

There is an editorial already : Editorial