View Code of Problem 3832

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main (){
	string str, s;
	while(cin>>str>>s){
		if(str.find(s)!=-1){
			printf("%d\n", str.find(s)+1);
		}else{
			printf("-1\n");
		}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3832