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

为何会Time Limit Exceed

Posted by 2004374415 at 2006-09-19 00:54:36 on Problem 1298
#include<iostream.h>
#include<string.h>
#include<stdio.h>
void main()
{
      char a[201];
      char s[11];
      cin>>s;
      while(strcmp(s,"ENDOFINPUT")!=0)
     {
	  if(strcmp(s,"START")==0)
          {
	    gets(a);
	      for(int i=0;a[i]!='\0';i++)
		{
          		if(a[i]>=65&&a[i]<=68) a[i]=a[i]+21;
			   else if(a[i]>=69&&a[i]<=90) a[i]=a[i]-5;
                                   else a[i]=a[i];
			 cout<<a[i];
		    
			}
		cout<<endl;
           
		  }

	         cin>>s;
	  
	  
	  }

}

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