(1) We stick to the grading plan as in the key3. (2) New Key for 5.25 (the solution for 5.25 in key3 is actually for 5.26 with similar idea) Compute the strongly connected components of G. Then construct a new graph G', and use one vertex to present one component. We know G'is a DAG. If there is more than one vertex in G' whose in-degree is 0, G does not have an arborescence; otherwise we have a vertex v in G' that can visit all other components by DFS, so G has an arborescence. The time complexity is O(n+m).