矩形的高和宽分别只有 $O(\sqrt n)$ 种,枚举之后求和即可。时间复杂度 $O(n)$。
QOJ.ac
QOJ
Discussion #1050 for Problem #17151. Bitwise Beach
Type: Editorial
Status: Open
Posted by: jiangly
Posted at:
Last updated:
题解
Comments
No comments yet.
Type: Editorial
Status: Open
Posted by: jiangly
Posted at:
Last updated:
矩形的高和宽分别只有 $O(\sqrt n)$ 种,枚举之后求和即可。时间复杂度 $O(n)$。