Ajob Commute II

Once again we return to Ajobshohor, the capital city and the heart of Ajobdesh. Ajobshohor’s road sy...

Static Tree

You are given a tree containing N vertices. The vertices are numbered from 1 to N. A tree with N ver...

Magical Tree Query

You are given a rooted tree (a connected graph with no cycles) with n vertices. The vertices are num...

Race in DomKi

There is a kingdom called DomKi. DomKi has N city and N-1 two-way road. Each city is numbered with 1...