Rosetta Problems

Exactly N points

https://atcoder.jp/contests/cf16-final/tasks/codefestival_2016_final_b