hdu 2203 亲和串

简介:

http://acm.hdu.edu.cn/showproblem.php?pid=2203
就是用两个函数就搞定了:

#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
char st[100005];
char st1[100005];
char st2[200005];
int main()
{
    while(cin>>st1>>st2)
    {
        strcpy(st,st1);//先复制
        strcat(st,st1);//然后接上
        if(strstr(st,st2) == NULL)//再找
            puts("no");
        else
            puts("yes");
    }
    return 0;
}
AI 代码解读
目录
相关文章
HDOJ(HDU) 1570 A C
HDOJ(HDU) 1570 A C
122 0
HDOJ(HDU) 1570 A C