|
|
back to boardI have WA 10 i use BigInteger ( it's exact true) :-) what's the problem...can somebody help me This is the first test where n*(n-1)/2 > 2^31 Don't use double, use Int64 only this part of code get WA10 __int64 ans = 0, sum_all_x = accumulate( vx.begin(), vx.end(), 0 ), sum_all_y = accumulate( vy.begin(), vy.end(), 0 ); but this part of code get AC __int64 ans = 0, sum_all_x = accumulate( vx.begin(), vx.end(), 0i64 ), sum_all_y = accumulate( vy.begin(), vy.end(), 0i64 ); =) |
|
|