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

杯具啊【附AC代码】

Posted by luchenqun at 2010-09-29 14:04:16 on Problem 2328
#include<iostream>
#include<string>
#define MAX 10000
int num,MMax=-100,MMin=100;
using namespace std;
int main()
{
	string a,str;
	while(cin>>num&&num)
	{
		cin>>a>>str;
		if(str=="high")
			MMin=num<MMin?num:MMin;
		if(str=="low")
			MMax=num>MMax?num:MMax;
		if(str=="on")
		{
			if(num>MMax&&num<MMin)
				cout<<"Stan may be honest\n";
			else
				cout<<"Stan is dishonest\n";
			MMax=-100;MMin=100;
		}
	}
	return 0;
}

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