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 |
两个tmp打擂台……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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator