Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- string a,b;
- cin>>a>>b;
- int al=a.length(),bl=b.length(),i,j,x,ans=0;
- for(i=0;i<=al-bl;i++)
- {
- int x=i,count=0;
- for(j=0;j<bl;j++)
- if(a[j+x]==b[j])
- count++;
- if(count%2==0)
- ans++;
- }
- cout<<ans<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment