摘要:
You have a rooted tree consisting of n vertices. Each vertex of the tree has some color. We will assume that the tree vertices are numbered by integer 阅读全文
摘要:
Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by a pair li and ri and asks you to count the 阅读全文
摘要:
There are nn apples on a tree, numbered from 11 to nn. Count the number of ways to pick at most mm apples. Input The first line of the input contains 阅读全文