Rosetta Problems

ふたつの料理 (Two Dishes)

https://atcoder.jp/contests/joisc2019/tasks/joisc2019_e