|back to board|
If you have WA on 16 test than maybe you have error in calculation of (xi - xj)^2.
See problem statement |xi| < 10^6 so (xi-xj)^2 may be 4*10^12 and it does not fit in int type.
Re: Test 16
Thanks a lot indeed! This is just where I've been confused with and your tips are really helpful!