rt,原题面有这句话:
For each input file, It is guaranteed that (the sum of P)≤320000\sqrt{P})\le320000P)≤320000
即 ∑P≤320000\sum\sqrt P\le320000∑P≤320000
不知道是不是你谷忘爬了,建议加上
然后这题是P5282的加强版,建议评黑