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

0ms过了

Posted by majia53 at 2010-10-14 14:46:16 on Problem 1936
In Reply To:我的16ms啊,怎么搞成0ms 啊。我实在是想不到 Posted by:liushengbing at 2010-05-28 16:45:59
#include <stdio.h>
char s[100010], t[100010];
int main()
{
    while(scanf("%s%s", s, t) != EOF)
    {
        int i = 0, j;
        for(j = 0; t[j] != 0; ++j)
            if(s[i] == t[j])
                ++i;
        printf("%s\n", s[i] == 0 ? "Yes" : "No");
    }
    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