| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160930 | 万骏博 | 统计特定单词数 | C++ | Wrong Answer | 1 MS | 272 KB | 453 | 2026-09-26 16:49:03 |
#include<bits/stdc++.h> using namespace std; int n,m,l; string s,c,a=""; int main(){ getline(cin,s); getline(cin,c); c+=" "; n=s.size(); m=c.size(); for(int i=0;i<n;i++){ if(s[i]>='A'&&s[i]<='Z'){ s[i]+=32; } } for(int i=0;i<m;i++){ if(c[i]!=' '){ if(c[i]>='A'&&c[i]<='Z'){ c[i]+=32; } a=a+c[i]; } else if(a==s){ l++; a=""; } else{ a=""; } } cout<<l; return 0; }
------Input------
alun is the best teacher of TCJY ALUN
------Answer-----
1 28
------Your output-----
1