数据范围爆long long了啊?

P1314 [NOIP2011 提高组] 聪明的质监员

stationofldyc @ 2017-07-25 21:36:28

200000^3 * 10^6>>2^63


by M_seа @ 2017-08-25 22:07:23

似乎并没有


by dyxx @ 2017-08-27 11:36:56

为啥是200000^3*10^6?

n <= 200000, m <= 200000, w[i] <= 10^6

j <= n

设t =∑ w[j] <= 2 * 10^11

 j = 1

ans = mt <= 2*10^5*2*10^11=4*10^16 < 2^17-1 = 9.223372036854885817*10^17


|