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

为什么有Output Limit Exceed 请各位高手看看

Posted by tcxgsy at 2005-08-07 18:56:07 on Problem 2017
#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:
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