Truy vấn trên cây

View as PDF



Problem type
Allowed languages
C++
Points: 1 Time limit: 4.0s Memory limit: 512M Input: stdin Output: stdout

Ví dụ

Đầu vào
5 2
1 2
1 3
2 4
2 5
1 2 3 4
2 2 13
Đầu ra
13
3 4

Comments

There are no comments at the moment.