Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

Can you solve this problem??

Revision en1, by EBAD, 2017-09-24 20:00:35

You're given a tree with n vertices.Your task is to calculate number of ways to give the ith edge of tree an integer number from interval [li,ri] such that sum of the numbers of all paths do not exceed k.output answer modulo 1e9+7.1<=li<=ri<=1e5 1<=n,k<=1e5 I really have no idea to solve this, please help me.

Tags #trees, weighted tree

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English EBAD 2017-09-24 20:00:35 339 Initial revision (published)