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 |
哪位大牛能解释一下GCC,G++,C,C++有什么不同?#include<stdio.h> #include<stdlib.h> int main(void) { int p[10001],n,i,j; __int64 sum; while(scanf("%d",&n)!=EOF){ for(i=0;i<n;i++) scanf("%d",&p[i]); sum=0; for(i=0;i<n;i++) for(j=i+1;j<n;j++) sum+=abs(p[i]-p[j]); sum=sum<<1; printf("%I64d\n",sum); } return 0; } 同样是这个代码,GCC,G++都AC,C,C++却TLE,为什么啊? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator