也是83
#include <iostream>
#include <vector>
#include <map>
using namespace std;
int solve(string S,string T)
{
int num=0;
for(int i=0;i<=int(S.size()-T.size());i++)
{
map<char,char> m1;
map<char,char> m2;
auto tmp=S.substr(i,T.size());
bool flag=true;
for(int j=0;j<T.size();j++)
{
if(m1.count(tmp[j]))
{
if(m1[tmp[j]]!=T[j])
{
flag=false;
break;
}
}
else
{
if(m2.count(T[j]))
{
if(m2[T[j]]!=tmp[j])
{
flag=false;
break;
}
}
else
{
m1[tmp[j]]=T[j];
m2[T[j]]=tmp[j];
}
}
}
if(flag)
{
num++;
}
}
return num;
}
int main() {
int res;
string _S;
getline(cin,_S);
string _T;
getline(cin,_T);
res=solve(_S,_T);
cout<<res<<endl;
return 0;
}