Rosetta Problems

Ball Passing Game

https://atcoder.jp/contests/awc0150/tasks/awc0150_g