there n city number 0 n1 give array edge edgesi fromi toi weighti represent bidirectional weighted edge city fromi toi give integ distancethresholdreturn city small number city reachable path distance distancethreshold if multiple city return city great numberNotice distance path connect city j equal sum edge weight path Example 1input n 4 edge 013121134231 distancethreshold 4output 3explanation the figure describe graph the neighboring city distancethreshold 4 city arecity 0 city 1 City 2 City 1 City 0 City 2 City 3 City 2 City 0 City 1 City 3 City 3 City 1 City 2 Cities 0 3 2 neighboring city distancethreshold 4 return city 3 great numberExample 2input n 5 edge 012048123142231341 distancethreshold 2output 0explanation the figure describe graph the neighboring city distancethreshold 2 city arecity 0 city 1 City 1 City 0 City 4 City 2 City 3 City 4 City 3 City 2 City 4city 4 City 1 City 2 city 3 the city 0 1 neighboring city distancethreshold 2 constraints2 n 1001 edgeslength n n 1 2edgesilength 30 fromi toi n1 weighti distancethreshold 104all pair fromi toi distinct