| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158415 | Kevin | 统计特定单词数 | C++ | Wrong Answer | 1 MS | 260 KB | 585 | 2026-08-21 15:39:01 |
#include<bits/stdc++.h> using namespace std; char a[30]; char b[10000]; int main() { int s=0; int m=-1; cin.getline(a,30); cin.getline(b,10000); int lena=strlen(a); int lenb=strlen(b); for(int i=0;i<lenb;i++){ if(i+lena>lenb) break; int t=i; for(int j=0;j<lena;j++){ char x,y; x=b[t]-32; y=b[t]+32; if((b[t]==a[j])||(x==a[j])||(y==a[j])){ t++; } else{ break; } } if((t-i)==lena){ s++; if(m==-1){ m=i; } } } if(s>0){ cout<<s<<" "<<m; } else{ cout<<-1; } return 0; }
------Input------
alun Alunis the best teacher of TCJY alun
------Answer-----
1 32
------Your output-----
2 0