zoj1970||poj 1936 All in All
来源:互联网 发布:纽约大学数据科学 编辑:程序博客网 时间:2024/05/22 08:07
注意细节,一直把Yes,写成YES,找错误找了老半天都找不出来。。。。
代码如下:
#include<stdio.h>#include<string.h>int main(){ char s[100005],t[100005]; int m,i,j,n; while(scanf("%s%s",s,t)!=EOF) { m=strlen(t); n=strlen(s); i=0; for(j=0;j<m;j++)//关键步骤,只判定b数组是否到头,复杂度o(n), { if(s[i]==t[j]) i++; } if(i==n) printf("Yes\n"); else printf("No\n"); } return 0;}
0 0
- zoj1970||poj 1936 All in All
- UVA10340 POJ1936 ZOJ1970 All in All
- poj 1936 "all in all"
- poj 1936 All in All
- POJ 1936 All in All
- poj 1936 All in All
- POJ 1936 all in all
- POJ 1936 All in All
- POJ 1936 All in All
- POJ 1936 All in All
- POJ-1936-All in All
- poj 1936 all in all
- poj 1936 All in All
- POJ 1936 All in ALL
- poj 1936 All in All
- poj 1936 All in All
- POJ 1936 All in All
- All in All(poj 1936)
- 用SQL命令查看Mysql数据库大小
- eralng gen_server模板
- linux tar等解压缩命令
- CXF异常
- 第一次!
- zoj1970||poj 1936 All in All
- phonegap监听物理返回键
- 《第一行代码——Android》
- POJ 1062 昂贵的聘礼
- scala习题参考链接
- OpenStack 网络:Neutron 初探
- 驱动开发之 设备读写方式:缓冲区方式
- html+css3制作QQ图标
- Hibernate 的各种保存方式的区别 (save,persist,update,saveOrUpdte,merge,flush,lock)