Company: Walmart sparkplug
Difficulty: medium
Critical Infrastructure Nodes The city's infrastructure is represented as a graph consisting of N nodes and M edges. Each node corresponds to a crucial infrastructure element, such as a power station or water supply point, and is assigned an importance score (S[i]). Each edge indicates a connection between these infrastructure components. A node is considered 'critical' if it meets both of the following conditions: Removing the node would lead to the formation of an additional disconnected component in the graph The node's importance score is higher than a specified threshold T Your task is to identify and list all nodes that qualify as critical infrastructure based on these conditions. Input Format The first line contains two integers N, M representing the number of nodes and the number of edges respectively. The next line contains N elements separated by spaces, where each element denotes the importance score S[i] of node i. The next M lines contains each pair of integers u and v rep