Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
string_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() { cin.ignore(); string str,st; cin>>str; int t; cin>>t; getline(cin,st); st.erase(remove(st.begin(),st.end(),' '),st.end()); cout<<find(str,st); }
run
|
edit
|
history
|
help
0
1st
Find the row with max ones
LRUCache
Do While Meteoro Agustin
HeatPump COP
Dar
2015(M2)Simulare
ONP without brackets
H - Subprime Fibonacci Sequence
HalumResto