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