Link
I have read the editorialist’s solution many times but couldn’t understand this part.
what this line in the dfs2 function is doing?
direct_cycle[u]+=direct_cycle[v];
Link
I have read the editorialist’s solution many times but couldn’t understand this part.
what this line in the dfs2 function is doing?
direct_cycle[u]+=direct_cycle[v];