View Code of Problem 3832

#include <cstdio>
#include <iostream>
#include <string>

using namespace std;
int main(){
	string s1;
	string s2;
	while(cin>>s1>>s2){
		int pos=s1.find(s2);
		if(pos!=-1)
			cout<<pos+1<<endl;
		else
			cout<<pos<<endl;	
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3832