HBC51038多组输入a+b II,过关题目,语言题Weather Forecast题解

坐在坟头思考人生 算法基础篇 46 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
By moving a big cloud around, you can decide the weather: it invariably rains under the cloud, and the sun shines everywhere else.But you are a benign God: your goal is to give enough rain to every field in the countryside, and sun to markets and festivals. Small humans, in their poor vocabulary, only describe this as "weather forecast".You are in charge of a small country, called Paccimc. This country is constituted of 4 x 4 square areas, denoted by their numbers.Your cloud is of size 2 x 2, and may not cross the borders of the country.You are given the schedule of markets and festivals in each area for a period of time.On the first day of the period, it is raining in the central areas , independently of the schedule.You should not leave an area without rain for a full week . You don't have to care about rain on days outside the period you were given: i.e. you can assume it rains on the whole country the day before the period, and the day after it finishes.

You are the God of Wind.  By moving a big cloud around, you can decide the weather: it invariably rains under the cloud, and the sun shines everywhere else.  But you are a benign God: your goal is to give enough rain to every field in the countryside, and sun to markets and festivals. Small humans, in their poor vocabulary, only describe this as "weather forecast".  You are in charge of a small country, called Paccimc. This country is constituted of 4 x 4 square areas, denoted by their numbers.  Your cloud is of size 2 x 2, and may not cross the borders of the country.  You are given the schedule of markets and festivals in each area for a period of time.  On the first day of the period, it is raining in the central areas (6-7-10-11), independently of the schedule.  On each of the following days, you may move your cloud by 1 or 2 squares in one of the four cardinal directions (North, West, South, and East), or leave it in the same position. Diagonal moves are not allowed. All moves occur at the beginning of the day.  You should not leave an area without rain for a full week (that is, you are allowed at most 6 consecutive days without rain). You don't have to care about rain on days outside the period you were given: i.e. you can assume it rains on the whole country the day before the period, and the day after it finishes. 

HBC51038多组输入a+b II,过关题目,语言题Weather Forecast题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
成为编程大师,不再是梦想!全网最全C++题库,助您开启编程新篇章。

标签: HBC51038多组输入a+b II 过关题目 语言题Weather Forecast题解