, which is to ask the minimum cost to send one unit of flow from the. You can refer the wiki page for further information of Minimum-cost Flow.
Bobo has a network of n n nodes and m m arcs. The i i-th arc goes from the a_i a i -th node to the b_i b i -th node, with cost c_i c i . Bobo also asks q q questions. The i i-th question is specified by two integers u_i u i and v_i v i , which is to ask the minimum cost to send one unit of flow from the 1 1-th node to the n n-th node, when all the edges have capacity frac{u_i}{v_i} v i u i (a fraction). You can refer the wiki page for further information of Minimum-cost Flow.