hdu 2203 亲和串
2015-06-17 14:55
267 查看
http://acm.hdu.edu.cn/showproblem.php?pid=2203
就是用两个函数就搞定了:
就是用两个函数就搞定了:
[code]#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; }
相关文章推荐
- TCP/IP协议栈
- Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
- How To Join XLA_AE_HEADERS and RCV_TRANSACTIONS(子分类账到事务处理追溯)
- junit 报错以及解决的办法
- oracle排序时把null放在最后
- ORA-01591: 锁被未决分布式事务处理解决方案
- MIPS 五级流水线
- Uva - 10129 - Play on Words
- Android Loader机制 源码笔记(2)
- Uva - 10129 - Play on Words
- An example of how to streaming audio over network using Qt
- 日期格式转换
- 批量查询ip
- Collections
- 软件开发
- Ninject Lazy Load问题
- 排序算法基本思想
- (笔试题)合法字符串
- RequireJS 文件合并压缩
- Java操作HTML格式字符串的标签和属性