atcoder donuts-live2014, codeeval 161