标签:color etl lse style nbsp its int upper col
#include<bits/stdc++.h> using namespace std; int main(){ string w,s; while(1){ int t=0,t2=0,l,l2; getline(cin,w); getline(cin,s); l=s.size(); l2=w.size(); for(int i=0;i<=l-l2;i++){ int j; for(j=0;j<l-1;j++){ if(toupper(s[i+j])!=toupper(w[j])) break; if(i>0&&s[i-1]!=‘ ‘) break; } if(j==l2&&s[i+j]==‘ ‘||j+i==l){ t++; if(t==1) t2=i; } } if(t==0) cout<<"-1"<<endl; else cout<<t<<" "<<t2<<endl; } return 0; }
标签:color etl lse style nbsp its int upper col
原文地址:https://www.cnblogs.com/ls-pankong/p/12597620.html