Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:TLE help;In Reply To:Re:TLE help; Posted by:hduOZ at 2007-07-09 13:34:48 res = 0; __int64 tmp1, tmp2, tmp3; res += U[0] - U[1]; tmp1 = res; res += V[0] - V[1]; tmp2 = V[0] - V[1]; res += W[0] - W[1]; tmp3 = W[0] - W[1]; for(i = 2; i < N; i ++) { tmp1 = tmp1 + i*(U[i-1] - U[i]); res += tmp1; tmp2 = tmp2 + i*(V[i-1] - V[i]); res += tmp2; tmp3 = tmp3 + i*(W[i-1] - W[i]); res += tmp3; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator