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

为什么显示run time error 这不写得好好的。。。怎么优化啊

Posted by ECPKN_mazeyuan at 2013-02-09 16:15:09 on Problem 3030
#include<stdio.h>
int main()
{
	int r,e,c,n,i,k,a[99][3];
	void judge(int x,int y,int z);
	scanf("%d",&n);
    for(i=0;i<n;i++)
	{
		scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);
	}
	for(k=0;k<n;k++)
	{
		judge(a[k][0],a[k][1],a[k][2]);
	}
	getch();

}
void judge(int x,int y,int z)
{
	if(x+z<y)
		printf("advertise\n");
	else if(x+z==y)
		printf("does not matter\n");
	else
		printf("do not advertise\n");
}

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