| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:为何会Time Limit ExceedIn Reply To:为何会Time Limit Exceed Posted by:2004374415 at 2006-09-19 00:54:36 //你那个判断条件都错了
#include<iostream>
#include<string.h>
#include<string>
using namespace std;
int main()
{
char s[12],end[10];string t;
while(gets(s)&&strcmp(s,"ENDOFINPUT"))
{
getline(cin,t);
gets(end);
string::iterator p=t.begin();
for(int i=0;i<t.length();i++)
{
if(*p>='A'&&*p<='E') *p='V'+*p-'A';
else if(*p>='F'&&*p<='Z') *p-=5;
cout<<*p;
++p;
}
cout<<endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator