Rosetta Problems

±AB

https://atcoder.jp/contests/arc127/tasks/arc127_f