Cod sursa(job #1915962)
Utilizator | Data | 8 martie 2017 23:18:07 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.21 kb |
#include<bits/stdc++.h>
int x,p,s[1<<18];std::string a,b="strmatch.";int main(){std::ifstream f(b+"in");std::ofstream g(b+"out");f>>a>>b;while((p=b.find(a,p))+1)s[x++]=p;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';}