#P2180. 摆石子
摆石子
Description
In a grid formed by horizontal lines and vertical lines (KK's self-made coordinate system), KK places stones, each stone only allowed to be placed at an intersection point of the grid.
Now KK wants to know, under the optimal placement, the maximum number of rectangles whose sides are parallel to the coordinate axes, and he requires that each of the four vertices of such a rectangle has exactly one stone placed on it.
Input Format
One line with three integers .
Output Format
Output one integer on a single line, representing the maximum number of rectangles that meet the requirement.
3 3 8
5
Hint
Constraints:
- For of the testdata, .
- For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号