Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
114132 | 唐安轩 | 统计特定单词数 | C++ | Wrong Answer | 0 MS | 272 KB | 674 | 2025-03-21 22:40:01 |
# include<iostream> # include<cstring> using namespace std; int main(){ string a,b; getline(cin,b); getline(cin,a); int len=a.size(); int cnt=0,t=0,i,j,q=a.find(b); int len2=b.size(); j=a.find(b); for (i=0;i<len;i++){ if (a[i]>='A' && a[i]<='Z') a[i]=a[i]+32; } for (i=0;i<len2;i++){ if(b[i]>='A' && b[i]<='Z'){ b[i]=b[i]+32; } } if (q!=-1){ while (q!=-1){ a.erase(q,len2); q=a.find(b); cnt++; } cout<<cnt<<" "<<j; return 0; } cout<<q; return 0; }
------Input------
alun is the best teacher of TCJY ALUN
------Answer-----
1 28
------Your output-----
-1