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

ac了,WA的注意了;

Posted by choupigwb at 2008-11-12 18:00:55 on Problem 2231
sort(a,a+n);
__int64 sum=0;
for(i=1;i<n;i++)	
   sum+=(n-i)*(i)*(a[i]-a[i-1]);
数组a一定要__int64或者long long, 不然WA;

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