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

你回车都不打,怎么可能会不PE

Posted by kobeallen at 2008-11-23 01:09:38 on Problem 1951
In Reply To:Re:为什么还是PE啊? Posted by:kobe8936 at 2008-11-22 17:13:23
> #include "stdafx.h"
> #include "test.h"
> #include <iostream>
> #include <string>
> using namespace std;
> 
> int main()
> {
> 	char check[30];
> 	check[0]='A';check[1]='E';check[2]='I';check[3]='O';check[4]='U';
> 	char input[100];
> 	int j=5;bool fst=true,cfst;
> 	while (scanf("%s",input)!=EOF)
> 	{
>         int len=strlen(input);
> 		cfst=true;
> 		for (int i=0;i<len;i++)
> 		{
> 			if (strchr(check,input[i])==0)
> 			{
> 				if (input[i]!='.'&&input[i]!=','&&input[i]!='?'&&cfst&&fst==false)
> 				{ 
> 					printf(" %c",input[i]);
> 					check[j++]=input[i];
> 					cfst=false;
> 				}
> 				else if (input[i]!='.'&&input[i]!=','&&input[i]!='?')
> 				{
> 					printf("%c",input[i]);
> 					check[j++]=input[i];
> 				}
> 				else
> 				{
> 					printf("%c",input[i]);
> 				}
> 			}
> 		} 
> 		fst=false;
> 	}
> }
> 

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