数学の問題をプログラミングで解く感じだな。地頭良くないとダメだネ。

https://icpc.iisf.or.jp/past-icpc/domestic2014/#section_B