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

哪位大哥帮我看看为什么我得不可以,调试的时候明明可以运行啊!!!

Posted by gxiverson at 2004-12-05 12:56:15 on Problem 1658
#include<iostream.h>
#include<math.h>
void main() {
	int i,t,a[21][5],d=0;
	cin>>t;
	for(i=0;i<=t;i++)
	{
		cin>>a[i][0];
		cin>>a[i][1];
		cin>>a[i][2];
		cin>>a[i][3];
	}
	for(i=0;i<=t;i++)
	{
		if(((a[i][2]-a[i][1])==d)&&((a[i][3]-a[i][2])==d)&&((a[i][1]-a[i][0])==d))
		{
			a[i][4]=2*a[i][3]-a[i][2];
		}
		else
		{
			a[i][4]=a[i][3]*a[i][3]/a[i][2];
		}
		cout<<a[i][0]<<" "<<a[i][1]<<" "<<a[i][2]<<" "<<a[i][3]<<" "<<a[i][4]<<endl;
	}
}

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