Problem B in Round #758 (Div.1 + Div. 2) using TopoSort ?

Revision en1, by GlydonNeedsDedication, 2021-12-12 16:10:41

I saw this Solution of Problem B by maroonrk using Topological sort in contest Round #758 (Div.1 + Div. 2)
Can anybody explains the intuition please?

Tags query, discussion

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English GlydonNeedsDedication 2021-12-12 16:11:50 9
en1 English GlydonNeedsDedication 2021-12-12 16:10:41 438 Initial revision (published)