Rosetta Problems

Stern–Brocot Tree

https://judge.yosupo.jp/problem/stern_brocot_tree