Company: Unthinkable
Difficulty: medium
Minimum Time to Split the Network Problem Description You are given an integer n and an undirected graph with n nodes labelled from 0 to n - 1 . The graph is described by a list of edges, where the i -th edge [u i , v i , time i ] is an undirected edge between nodes u i and v i that gets removed at moment time i . You are also given an integer k . Initially the graph may be connected or disconnected. Find the minimum value of t such that after removing every edge whose time ≤ t , the graph contains at least k connected components. A connected component is a subgraph in which there is a path between any two of its vertices, and no vertex of the subgraph shares an edge with a vertex outside of the subgraph. An isolated node is a connected component of size one. Note that t = 0 is allowed, in which case no edge is removed (all times are at least 1). Input Format The first line contains three space-separated integers n , m and k — the number of nodes, the number of edges and the r