jiangsu

The 2018 ACM-ICPC China JiangSu Provincial Programming Contest(第六场)

匿名 (未验证) 提交于 2019-12-03 00:43:02
A Plague Inc Plague Inc. is a famous game, which player develop virus to ruin the world. JSZKC wants to model this game. Let‘s consider the world has N×Mimes MN×M cities. The world has N rows and M columns. The city in the X row and the Y column has coordinate (X,Y). There are K cities which are sources of infection at the 0th day. Each day the infection in any infected city will spread to the near four cities (if exist). JSZKC wants to know which city is the last one to be infected. If there are more than one cities , answer the one with smallest X firstly, smallest Y secondly. Input Format