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 |
为什么有Output Limit Exceed 请各位高手看看#define M 1024 #include"stdio.h" #include"math.h" main() { int n,i; int b; int a[M][2]; a[0][1]=0; while(n!=-1) { scanf("%d",&n); b=0; for(i=1;i<=n;i++) scanf("%d%d",&a[i][0],&a[i][1]); for(i=n;i>0;i--) { b+=a[i][0]*(a[i][1]-a[i-1][1]);} printf("%d miles\n",b); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator