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 wqfcr at 2003-12-10 16:36:56 on Problem 1006
但是您看我的输出部分《》,怎么会OUTPUT LIMIT EXCEED?

#include <iostream.h>
void deal(int p,int e,int i,int d,int t)
{
	int m=0;
	for(m=0;;m++)
	{
		if((m-i)%33==0)
			break;
	}
	for(m=m;;m=m+33)
	{
		if((m-e)%28==0)
			break;
	}
	for(m=m;;m=m+28*33)
	{
		if((m-p)%23==0)
			break;
	}
《	if(m<=d)
		cout<<"Case "<<t+1<<": the next triple peak occurs in "<<m+21252-d<<" days."<<endl;
	else
		cout<<"Case "<<t+1<<": the next triple peak occurs in "<<m-d<<" days."<<endl;》
}
void main()
{
	int a[50],b[50],c[50],n[50];
	int i=0,j=0;
	cin>>a[i]>>b[i]>>c[i]>>n[i];
	while(a[i]!=-1)
	{
		i++;
		cin>>a[i]>>b[i]>>c[i]>>n[i];
	}
	for(j=0;j<i;j++)
		deal(a[j],b[j],c[j],n[j],j);
}


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