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:TLE help; Posted by:hduOZ at 2007-07-09 12:55:33 for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { sum=sum+((x[i]-x[j])+(y[i]-y[j])+(z[i]-z[j]))/2; } } 那这个降为O(n) Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator