Atenţie! Aceasta este ultima versiune a paginii, scrisă la 2020-09-01 18:50:51.
Revizia anterioară   Revizia următoare  

We are given a graph with n vertices and m undirected edges. The edges are numbered in the order they are given in the input.
For every (i, j), for which 1 ≤ i ≤ j ≤ m, create a graph with n vertices and edges the edges of the original graph with indexes from i to j inclusively.
Find how many of these graphs are connected.