Rosetta Problems

立方体とペンキ

https://atcoder.jp/contests/code-festival-2015-morning-middle/tasks/cf_2015_morning_hard_b