| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 136446 | 李朋秦 | 统计特定单词数 | C++ | Wrong Answer | 1 MS | 284 KB | 400 | 2025-11-14 16:55:01 |
#include<bits/stdc++.h> using namespace std; int main() { string a,b; getline(cin,a); getline(cin,b); int l1=a.size(),l2=b.size(),g=0,y=0,c=0; for(int i=0;i<l2;i++)b[i]=toupper(b[i]); for(int i=0;i<l1;i++)a[i]=toupper(a[i]); b=' '+b+' '; a=' '+a+' '; y=b.find(a); for(int i=0;i<l2;i++){ c=b.find(a); if(c!=-1)g++; b.erase(c+1,l1); }cout<<g<<" "<<y; return 0; }
------Input------
alun A lun is the best teacher of TCJY
------Answer-----
-1
------Your output-----
0 -1