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 zhaohuazhaoshi at 2005-04-29 02:42:40 on Problem 1298
#include<iostream>
#include<string>
using namespace std;
int main()
{
	int b=0,i;
	char a[10000];
	string s;
	cin>>s;
	while(s!="ENDOFINPUT")
	{
		if(s=="START")	
		{
			i=0;
			while(1)
			{
				a[i]=cin.get();
				if(a[i]=='D'&&a[i-1]=='N'&&a[i-2]=='E')					
					break;
				i++;
				b++;
			}
			for(i=0;i<=b-3;i++)
			{
				if(a[i]>=70&&a[i]<=90)
					a[i]-=5;
				else if(a[i]>=65&&a[i]<=69)a[i]+=21;
				if(a[i]==53)
					a[i]-=21;
			}
			for(i=1;i<=b-4;i++)
				cout<<a[i];
			b=0;
		}
		cout<<endl;
		cin>>s;
	}
	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