| ||||||||||
| 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 | |||||||||
这边没有这个题的,你到那个服务器上面去问吧In Reply To:上周的上级测试,看看Why WR,是不是输入错误?…… Posted by:cpp00548322 at 2006-03-26 03:30:03 > #include<string.h>
> #include<stdio.h>
> #include<iostream.h>
>
> char re[1000][4];int p=0;
> int main()
> {
> int N,i=0,len1=0,len2=0;int m1=0,m2=0,j=0;
> char str1[101],str2[101];
> char Pstr1[101],Pstr2[101];
>
> cin>>N;
> for(i=0;i<N;i++)
> {
> cin.get();
> memset(str1,'\0',100);memset(str2,'\0',100);
> memset(Pstr1,'\0',100);memset(Pstr2,'\0',100);
> cin.getline(str1,100,'\n');
>
>
> m1=0,m2=0,j=0;
> len1=strlen(str1);
> cin.getline(str2,100,'\n');len2=strlen(str2);
>
> if(len1==0&&len2==0) {cout<<"YES\n";continue;}
> for( j=0,m1=0;j<len1;j++)
> if((str1[j]<='z'&&str1[j]>='a')||(str1[j]<='Z'&&str1[j]>='A'))
> { Pstr1[m1]=str1[j];m1++;}
>
>
> for(j=0,m2=0;j<len2;j++)
> if((str2[j]<='z'&&str2[j]>='a')||(str2[j]<='Z'&&str2[j]>='A'))
> { Pstr2[m2]=str2[j];m2++;}
>
> if(m1!=m2){cout<<"NO\n"; continue;}
>
>
> p=stricmp(Pstr1,Pstr2);cout<<p<<endl;
> if(p==0) { cout<<"YES\n"; continue;}
> else {cout<<"NO\n"; continue;}
> }
> return 1;
> }
>
>
>
>
>
>
>
>
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator