Cod sursa(job #709311)

Utilizator gabrielvGabriel Vanca gabrielv Data 7 martie 2012 22:54:02
Problema Oo Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.27 kb
using namespace std;
#include<cstdio>
#define MAX 100005
char x[MAX],y[MAX];
int main()
{
	freopen("sr.in","r",stdin);
	freopen("sr.out","w",stdout);
	int i,j;
	scanf("%s\n%s",x+1,y+1);
	for(j=1,i=1;y[i];i++)
	{
		for(;x[j]!=y[i];j++);
		printf("%d ",j++);
	}
	return 0;
}