Decomposition of Paths

Правка en2, от aloo_parantha, 2020-12-27 09:12:02

You are given a tree that contains vertices and queries. Each query is determining the number of decompositions of the tree into paths and the path from to that is one of the paths in the decomposition modulo 998244353.

A tree decomposition in paths is valid if each vertex belongs to exactly one path. A path can be a single vertex. Two decompositions are different if there are two vertices and that belong to the same path in one of the decompositions but two distinct paths in the other.

Sample Input:

Sample input

Can anyone please explain this problem with an example... Problem Link : https://www.hackerearth.com/problem/algorithm/path-decomposition-ii-ad4b4a0c/

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский aloo_parantha 2020-12-27 09:14:13 76
en4 Английский aloo_parantha 2020-12-27 09:13:14 31
en3 Английский aloo_parantha 2020-12-27 09:12:34 26
en2 Английский aloo_parantha 2020-12-27 09:12:02 94
en1 Английский aloo_parantha 2020-12-27 09:10:37 749 Initial revision (published)