codevs1029遍历问题
来源:互联网 发布:大数据风控 汽车金融 编辑:程序博客网 时间:2024/06/03 14:21
#include<stdio.h>
#include<string.h>
int ans;
int main()
{
freopen("遍历问题.in","r",stdin);
freopen("遍历问题.out","w",stdout);
char a[999999],b[999999];
int i,j,l1,l2;
gets(a);
gets(b);
l1=strlen(a),l2=strlen(b);
for(i=1;i<l1;i++)
for(j=0;j<l2;j++)
if(a[i]==b[j]&&a[i-1]==b[j+1])
ans++;
printf("%d\n",(1<<ans));
return 0;
#include<string.h>
int ans;
int main()
{
freopen("遍历问题.in","r",stdin);
freopen("遍历问题.out","w",stdout);
char a[999999],b[999999];
int i,j,l1,l2;
gets(a);
gets(b);
l1=strlen(a),l2=strlen(b);
for(i=1;i<l1;i++)
for(j=0;j<l2;j++)
if(a[i]==b[j]&&a[i-1]==b[j+1])
ans++;
printf("%d\n",(1<<ans));
return 0;
}
0 0
- codevs1029遍历问题
- 遍历问题[CODEVS1029]解题报告
- codevs1029 遍历问题(一直前序和后序求中序个数)
- codevs1029
- 遍历问题
- 遍历问题
- 遍历问题
- 马的遍历问题
- 遍历矩阵格问题
- 二叉树遍历问题
- RMS遍历问题
- 前序中序遍历问题
- 骑士遍历问题
- 马的遍历问题
- 二叉树遍历问题
- sdcard 遍历问题
- 马的遍历问题
- 数据结构《遍历问题》
- 单链表建立 插入 删除
- <<摸着石头过河>>摘录一
- struts.xml配置
- Android实现微信支付纪录篇
- phoenix-4.8.0整合hbase-1.2.0-cdh5.8.0
- codevs1029遍历问题
- C#调用WIN32 的API函数--USER32.DLL
- Tomcate配置到MyEclipse
- 从键盘输入两个正整数,求这两个正整数的最小公倍数和最大公约数,并输出。
- 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclips
- 状态栏、导航栏、沉浸等知识
- 使用SQLite.Swift实现SQLite3.0的读写
- 输入函数gets()、fgets()、scanf()、getchar()
- 循环矩阵傅里叶对角化