solve 1186 1187 ICPC-Domestic 2013