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 lambda2fei at 2008-08-27 09:55:56 on Problem 1298 and last updated at 2008-08-27 09:56:51
#include<iostream>
using namespace std;

int main()
{
	char ch,chs[20];
	while(true){
		int i=0;
		while(true){
			ch=getchar();			
			if(ch=='\n')
				break;
			else{
				chs[i]=ch;
				i++;
			}
		}
		if(chs[0]=='E' && chs[1]=='N' && chs[2]=='D' && chs[3]=='O' && chs[4]=='F' && chs[5]=='I' && chs[6]=='N' && chs[7]=='P' && chs[8]=='U' && chs[9]=='T')
			break;
		while(true){
			ch=getchar();
			if(ch=='\n'){
				cout<<endl;
				break;
			}
			if(ch>='F' && ch<='Z')
				cout<<(char)(ch-5);
			else if(ch>='A' && ch<='E')
				cout<<(char)(ch+21);
			else cout<<ch;
		}		
		while(true){
			ch=getchar();
			if(ch=='\n')
				break;
		}
	}
	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