| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 8401 | 刘逸杭 | 统计特定单词数 | C++ | Wrong Answer | 0 MS | 268 KB | 532 | 2025-11-29 20:07:12 |
#include<bits/stdc++.h> using namespace std; int main(){ string s,s1; int cnt=0,i=0; cin>>s1; cin.get(); getline(cin,s); for(int i=0;i<s.size();i++){ if(s[i]>='A'&&s[i]<='Z') s[i]+=32; if(s1[i]>='A'&&s1[i]<='Z') s1[i]+=32; } if(s.find(s1)!=s.npos){ while(s.find(s1,i)!=s.npos){ if(s.find(s1,i)) cnt++; i=s.find(s1,i)+s1.size(); } cout<<cnt<<' '<<s.find(s1); return 0; } cout<<-1; return 0; }
------Input------
alun Alun a l u n alu n aluN
------Answer-----
2 0
------Your output-----
1 0