4 solutions
-
0
#include<iostream> #include<string> using namespace std; int main(){ int n,m; cin>>n>>m; string a[n],b; for(int i=0;i<n;i++){ cin>>a[i]; } cin>>b; for(int i=0;i<m;i++){ b[i]-=2; } int ans=0; for(int i=0;i<n;i++){ int temp=a[i].find(b); while(temp!=-1){ ans++; temp=a[i].find(b,temp+1); } } cout<<ans; return 0; }
Information
- ID
- 129
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 212
- Accepted
- 57
- Uploaded By