Rosetta Problems

Playing With Stones

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