Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
st_match
#include <bits/stdc++.h> using namespace std; int find(string &st1,string &st2) { string temp; int l,f,c; l= st1.length(); c=0; for(int i=0;i<l;i++) { for(int j=1;j<=(l-i);j++) { temp = st1.substr(i,j); f= temp.find(st2); if(f!= -1) c++; } } return c; } int main() { string str,st; cin>>str; int t; cin>>t; //cin.ignore(); getline(cin,st); st.erase(remove(st.begin(),st.end(),' '),st.end()); cout<<find(str,st); }
run
|
edit
|
history
|
help
0
is_num_palindrom
Random Vector Generator
Template
Classes Pt 2 c++
Trace
perfect square
scemo le
series kv type 1
List Add v3
DoubleListInt