CF925F Parametric Circulation
Description
where $ \\delta^{+}(v) $ is the set of edges that end in the vertex $ v $ , and $ \\delta^{-}(v) $ is the set of edges that start in the vertex $ v $ . In other words, for each vertex the total incoming flow should be equal to the total outcoming flow.
Let a $ lr $ -circulation be such a circulation $ f $ that for each edge the condition $ l\_e \\leq f\_e \\leq r\_e $ holds, where $ l\_e $ and $ r\_e $ for each edge $ e \\in E $ are two non-negative real numbers denoting the lower and upper bounds on the value of the circulation on this edge $ e $ .
Vova can't stop thinking about applications of a new topic. Right now he thinks about the following natural question: let the graph be fixed, and each value $ l\_e $ and $ r\_e $ be a linear function of a real variable $ t $ :
$ $ l_e(t) = a_e t + b_e $ $ $ $ r_e(t) = c_e t + d_e $ $
Note that $ t $ is the same for all edges.
Let $ t $ be chosen at random from uniform distribution on a segment $ \[0, 1\] $ . What is the probability of existence of $ lr$$$-circulation in the graph?