ms 2014 r1A: http://hihocoder.com/contest/msbop2014r2a