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

能测的数据都测了,就是WA,疯了

Posted by wyu_feng at 2008-10-12 01:50:44 on Problem 2328
#include<iostream>
#include<string>
using namespace std;
int main()
{
	int g[1000];
	int i=0,j=0,Max=11,Min=0;
	while (1) {
	string a,b[1000];
	while (a.size()!=5) {
       cin>>g[i];
	   if(g[i]==0)break;
	   cin>>a>>b[i];
	   i++;
	}
	if(g[i]==0)break;
	i=i-1;
	if(g[i]<=Min||g[i]>=Max){cout<<"Stan is dishonest"<<endl;break;}
	for(j=0;j<i;j++)
	{
        if(b[j].size()==4&&g[i]>=g[j]){cout<<"Stan is dishonest"<<endl;break;}
        if(b[j].size()==3&&g[i]<=g[j]){cout<<"Stan is dishonest"<<endl;break;}
	}
	if(j==i)cout<<"Stan may be honest"<<endl;
	i=0;j=0;
	}
	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