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

测试数据都对了,可老是WA,帮忙指点!

Posted by tang_angison at 2007-07-06 10:59:48
#include<stdio.h>
int main()
{
    char s[1000000],t[1000000];
    int i,j,k;
    while(scanf("%s%s",s,t)!=EOF)
    {   j=0;
        for(i=0;s[i];i++)
        {
            for(k=1;t[j];j++){
                if(s[i]==t[j])
                    k=0;
                if(!k) break;
            }
            if(k)break;
        }
        if(k) printf("No\n");
        else printf("Yes\n");
    }
    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