Cod sursa(job #2617268)
Utilizator | Data | 21 mai 2020 12:37:11 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.45 kb |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
string a,b;
int main()
{
ifstream cin("strmatch.in");
ofstream cout("strmatch.out");
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>a>>b;
int poz = b.find(a);
if (poz!=-1) cout<<poz<<" ";
while(1){
poz = b.find(a,poz+1);
if (poz!=-1) cout<<poz<<" ";
else break;
}
return 0;
}