
You are given an undirected graph defined by an integer n , the number of nodes, and a 2D integer array edges , the edges in the graph, where edges[i] = [u _i , v _i ] indicates that there is an undirected edge between u _i and v _i . You are also given an integer array queries .
Let incident(a, b) be defined as the number of edges that are connected to either node a or b .
The answer to the j ^th query is the number of pairs of nodes (a, b) that satisfy both of the following conditions:
a < b
incident(a, b) > queries[j]
Return an array answers such that answers.length == queries.length and answers[j] is the answer of the j ^th query .
Note that there can be multiple edges between the same two nodes.
2 <= n <= 2 * 10 ^41 <= edges.length <= 10 ^51 <= u _i , v _i <= nu _i != v _i1 <= queries.length <= 200 <= queries[j] < edges.length