Cod sursa(job #3220351)
Utilizator | Data | 3 aprilie 2024 12:27:09 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.3 kb |
#include<fstream>
using namespace std;
int s[1<<22];
ifstream cin("strmatch.in");
ofstream cout("strmatch.out");
int main(){
int x,p;
string a,b="";
cin>>a>>b;
while(p=b.find(a,p)+1)
s[x++]=p-1;g<<x<<"\n";
while(p<x & p<1000)
cout<<s[p++]<<" ";
}