## 「CodeForces 1220E」 Tourism

Alex decided to go on a touristic trip over the country.

For simplicity let's assume that the country has 𝑛 cities and 𝑚 bidirectional roads connecting them. Alex lives in city 𝑠 and initially located in it. To compare different cities Alex assigned each city a score 𝑤𝑖 which is as high as interesting city seems to Alex.

## 「CodeForces 1241E」Paint the Tree

You are given a weighted tree consisting of 𝑛 vertices. Recall that a tree is a connected graph without cycles. Vertices 𝑢𝑖 and 𝑣𝑖 are connected by an edge with weight 𝑤𝑖.

## 「CodeForces 1249E」Maximum Weight Subset

You are given a tree, which consists of 𝑛 vertices. Recall that a tree is a connected undirected graph without cycles.

Example of a tree.
Vertices are numbered from 1 to 𝑛. All vertices have weights, the weight of the vertex 𝑣 is 𝑎𝑣.

Recall that the distance between two vertices in the tree is the number of edges on a simple path between them.

## 「ZJOI2008」 骑士

Z国的骑士团是一个很有势力的组织，帮会中汇聚了来自各地的精英。他们劫富济贫，惩恶扬善，受到社会各界的赞扬。