Rosetta Problems

Proportional Representation

https://atcoder.jp/contests/JAG2014Spring/tasks/icpc2014spring_g