Блог пользователя EBAD

Автор EBAD, история, 6 лет назад, По-английски

Given a weighted graph with n nodes and m edges. for each node v we should calculate number of nodes u such that d(v,u)<=k . n,m<=5e4 k<=100; Please somebody help me. UPD: I don't know if it's important or not but Wi<=100 for every edge.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор EBAD, история, 7 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится