cf round 197
fix on ime-usp 2013 problem k
cf gym - ukraine icpc subregional 2013