Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

两个tmp打擂台……

Posted by lqp18_31 at 2009-07-28 14:39:39 on Problem 2231
    ULL ans=0LL,tmp=0LL,tmp2=0LL;
    for( int i=2 ; i<=N; i++){
         tmp2=tmp+(a[ i ]-a[ i-1 ])*(i-1);
         ans+=tmp2;
         tmp=tmp2;
    }

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator