View Code of Problem 3832

#include <stdio.h>
#include <string.h>

int main(){
	char a[100000];
	char b[100000];
	while(scanf("%s %s",a,b)!=EOF){
		char *p=strstr(a,b);
		if(p){
			printf("%d\n",p-a+1);
		}else{
			printf("%d\n",-1);
		}
	}
}

Double click to view unformatted code.


Back to problem 3832