You are viewing a single comment's thread. Return to all comments →
For each of the Q queries, print the number of paths in T having cost C in the inclusive range [L, R] on a new line.
^ That is an ambigious sentence. Can you please elaborate?
C= Max(all weight in a given path);
So you have to find number of paths for which Cs lie in the given range [L,R]