#7076: __提示


morris1028 (碼畜)


使用公式加二分。
公式

Erdős–Gallai theorem

http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Gallai_theorem