# [ciel the commander](https://codeforces.com/contest/321/problem/C)
assign letters A-Z to tree vertices. for every pair a,b
a person with higher letter is on the path between them
$N \leq 10^5$
# [xenia and tree](https://codeforces.com/contest/342/problem/E)
$N,Q \leq 10^5$
qlog(n)^2
qlog(n)
insert/delete?
# [Furthest hot dog stand](https://judge.progolymp.se/contests/centroid/problems)
# [IOI 2012 race](https://oj.uz/problem/view/IOI11_race)
$N \leq 10^5$
Famous problem
Given a tree, is there a path of length exactly $K$?
The edges have weights, $w,k \leq 10^9$
# [BOI 2021 servers](https://oj.uz/problem/view/BOI21_servers)
Given a tree. Every node $i$ stores information $i$ piece $i$. $N-1$ times, two servers share their data
Queries:
- server i and j share their data
- does server x store data chunk x?
- count number of servers storing chunk k
# [Joshua's problem](https://judge.progolymp.se/contests/centroid/problems/countnodes)
Given a tree.
- Query: how many nodes have distance $\leq K$ to node $u$
# [LWBD]( https://codeforces.com/problemset/gymProblem/100633/D?locale=en)
Given a tree.
- Updates: start at node $u$, color all nodes color $C$ within distance $K$
- Query: what is the color of node $U$
# How to recognize?
- Tree problem
- High-ish time limit
- Subtask with low degrees (binary trees have low degree)
- You need to consider all paths with a certain node as their endpoint in $\log$ time.
- You need to consider all paths in the tree