#include<bits/stdc++.h> using namespace std; bool f=true; int pos; int main(){ string s,a; getline(cin,s); getline(cin,a); if(s.find(a)==-1){ f=false; cout<<-1; }else{ while(f){ pos=s.find(a,pos+1); if(pos==-1){ f=false; break; } cout<<pos+1<<endl; } } return 0; }
使用您的 Hydro 通用账户