Corona Virus
题号:NC237454
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Alice's country has  cities and  undirected roads. Each road connects two different cities. And One city can go to any other city using these  roads, which means that these cities form a tree. The distance between two cities is defined as the number of roads on their shortest path.

The country is fighting against the Covid-19. To facilitate the management of the country, these  cities will be divided into some areas. Each city must be exactly in one area. Once a Covid-19 occurs in an area, this area will be closed immediately. Each area must contain at least one city, must be a connected component, and its diameter must not be greater than . The diameter of an area is defined as the maximum distance between two cities belonging to this area.

Alice wants to know how many different ways to divide the cities into some areas. two ways are different if and only if there exists any city such that the area containing this city in these two ways are different.

As the answer may be too large, print it modulo .

输入描述:

The first line contains two integers  , indicating the number of the cities and the maximum diameter of an area, respectively.

The second to the -th lines, each line contains two integers  , indicating a road.

输出描述:

One single integer, denoting the answer modulo .
示例1

输入

复制
3 0
2 3
1 3

输出

复制
1
示例2

输入

复制
5 2
3 1
2 4
1 5
2 1

输出

复制
13