A problem about DAG

Revision en1, by gkO_o, 2024-03-26 11:46:48

There are a total of n delivery points in a delivery station, and these points are connected by m one-way lanes.The delivery person cannot return to a station through a one-way lane. In other words, the n delivery points form a directed acyclic graph. For a delivery point u, if the delivery person can travel from u to any other point v (v≠u), or from v to u, then the station u is considered a super delivery point. Please help calculate the number of super delivery points.

n, m ≤ 3e5

Tags dag, dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English gkO_o 2024-03-26 11:53:23 4
en2 English gkO_o 2024-03-26 11:48:40 26 Tiny change: ' total of n delivery ' -> ' total of $$n$$ delivery '
en1 English gkO_o 2024-03-26 11:46:48 512 Initial revision (published)