ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1726. Visits

who have WA 10???
Posted by Rudolf [Sumy SU] 18 Oct 2009 19:45
I have WA 10
i use BigInteger ( it's exact true) :-)

what's the problem...can somebody help me
Re: who have WA 10???
Posted by Alexander Mangilyov (TNU) 20 Oct 2009 21:28
This is the first test where n*(n-1)/2 > 2^31
Re: who have WA 10???
Posted by Valentin (PSU) 6 Oct 2011 12:49
Don't use double, use Int64 only
Re: who have WA 10???
Posted by IgorKoval(from Pskov) 4 Feb 2012 18:09
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 );

=)