Rosetta Problems

LCA Counting

https://onlinejudge.u-aizu.ac.jp/problems/3376