Directed graph is given with adjacency list. Find the number of edges in it. Input The first line contains the number of
Posted: Sat Jul 09, 2022 11:48 am
Directed graph is given with adjacency list. Find the number of edges in it. Input The first line contains the number of vertices n. Then n lines are given. The i-th line contains the description of all edges, outgoing from the i-th vertex. Description starts with the number of outgoing edges. Then given the vertex numbers where the edges go. All vertices are numbered from 1 to n. Output Print the number of edges in the graph. Sample graph 3 2 Sample input 3 3 223 0 1 2 Sample output 1 2 3 (2,3) () (2) 0 0 0 1 1 0 0 1 0 Activate Windows Go to Settings to activate Windows.