Codeforces исполнилось 10 лет! Мы рады анонсировать краудфандинг-кампанию. Поздравьте нас по ссылке https://codeforces.com/10years. ×

Can you solve this problem??

Правка en1, от 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.

Теги #trees, weighted tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский EBAD 2017-09-24 20:00:35 339 Initial revision (published)