
An undirected graph of n nodes is defined by edgeList , where edgeList[i] = [u _i , v _i , dis _i ] denotes an edge between nodes u _i and v _i with distance dis _i . Note that there may be multiple edges between two nodes.
Given an array queries , where queries[j] = [p _j , q _j , limit _j ] , your task is to determine for each queries[j] whether there is a path between p _j and q _j _ such that each edge on the path has a distance strictly less than limit _j .
Return a boolean array answer , where answer.length == queries.length and the j ^th value of answer is true if there is a path for queries[j] is true , and false otherwise .
2 <= n <= 10 ^51 <= edgeList.length, queries.length <= 10 ^5edgeList[i].length == 3queries[j].length == 30 <= u _i , v _i , p _j , q _j <= n - 1u _i != v _ip _j != q _j1 <= dis _i , limit _j <= 10 ^9There may be multiple edges between two nodes.