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

Re:附上一点代码

Posted by Tidus5 at 2009-04-26 14:03:33 on Problem 2328 and last updated at 2009-04-26 14:30:36
In Reply To:搞了半天 总算AC了 大家一定要注意初值啊 Posted by:Tidus5 at 2009-04-26 13:59:32
附上代码 给迷茫的人一点参考吧 大牛就不要笑我了

while(t!=0)
{	
	
	ch=getchar();
	scanf("%s%s",&buf,&temp);
	
	if(compare(temp,high)==true && t<phigh)		
			phigh=t;
	if(compare(temp,low)==true && t>plow)	
			plow=t;
	if(compare(temp,right)==true)			
		{
		if(t>plow && t<phigh)
			{
				cout<<"Stan may be honest"<<endl;
				plow=0;
				phigh=11;				
			}
		else
			{
				cout<<"Stan is dishonest"<<endl;			
				plow=0;
				phigh=11;
			}
		}	
	cin>>t;
}

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