| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 153238 | 黄俊然 | 统计特定单词数 | C++ | Wrong Answer | 1 MS | 276 KB | 923 | 2026-05-10 15:21:21 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ string a,b; int f=1,g,h=0,s=0; getline(cin,a); getline(cin,b); for(int i=0;i<a.length();i++){ if(a[i]>='A' && a[i]<='Z'){ a[i]+=32; } } for(int i=0;i<b.length();i++){ if(b[i]>='A' && b[i]<='Z'){ b[i]+=32; } } for(int i=0;i<b.length();i++){ for(int j=0;j<a.length();j++){ if(a[i]==b[j] && f==1){ f=1; s++; } if(s==3 && f==1){ h+=1; g=i; } } } if(h>=1) cout<<h<<" "<<g; else cout<<"-1"; return 0; }
------Input------
alun is the best teacher of TCJY ALUN
------Answer-----
1 28
------Your output-----
-1