-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1029.cpp
More file actions
36 lines (32 loc) · 767 Bytes
/
1029.cpp
File metadata and controls
36 lines (32 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*************************************************************************
> File Name: 1029.cpp
> Author: dulun
> Mail: [email protected]
> Created Time: 2016年03月17日 星期四 17时42分08秒
************************************************************************/
#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#define LL long long
using namespace std;
const int N = 50086;
char a[N];
char b[N];
int main()
{
scanf("%s%s",a, b);
int l1 = strlen(a);
int l2 = strlen(b);
int sum = 0;
for(int i = 1; i < l1; i++)
for(int j = 1; j < l2; j++)
{
if(a[i-1] == b[j] && a[i] == b[j-1])
sum++;
}
int ans = 1<<sum;
cout<<ans<<endl;
return 0;
}