//1210
#include <string>
#include <iostream>
using namespace std;
int main()
{
string pre,post;
cin >> pre >> post;
int len = pre.size();
int res = 1;
for (int i = 0; i < len - 1; i++)
{
int temp = post.find(pre[i]);
if (temp != 0 && pre[i + 1] == post[temp - 1])
res *= 2;
}
cout << res << endl;
return 0;
}
sicily 1210 二叉树
最新推荐文章于 2017-06-27 21:14:15 发布