HBC17342Beautiful Garden题解

季陌殇 算法基础篇 57 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
There's a beautiful garden whose size is n x m in Chiaki's house. The garden can be partitioned into n x m equal-sized square chunks. There are some kinds of flowers planted in each square chunk which can be represented by using lowercase letters. However, Chiaki thinks the garden is not beautiful enough. Chiaki would like to build a water pool in the garden. So that the garden would look like symmetric . The water pool is a rectangle whose size is p x q and the center of the water pool is also the center of the garden. Something else important you should know is: n, m, p and q are all even. p is always less than n. q is always less than m. The borders of the water pool are parallel to the border of garden. Chiaki would like to know the number of different pairs of she can choose.

There's a beautiful garden whose size is n x m in Chiaki's house. The garden can be partitioned into n x m equal-sized square chunks. There are some kinds of flowers planted in each square chunk which can be represented by using lowercase letters. However, Chiaki thinks the garden is not beautiful enough. Chiaki would like to build a water pool in the garden. So that the garden would look like symmetric (both horizontally and vertically). The water pool is a rectangle whose size is p x q and the center of the water pool is also the center of the garden. Something else important you should know is: n, m, p and q are all even. p is always less than n. q is always less than m. The borders of the water pool are parallel to the border of garden. Chiaki would like to know the number of different pairs of (p, q) she can choose.

HBC17342Beautiful Garden题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC17342Beautiful Garden题解