View Code of Problem 3832

#include <iomanip>
#include <algorithm>
#include <cstdio>
#include <map>
#include <math.h>

#include <string>
#include<stdio.h>
#include <iostream>
#include <stdlib.h>
using namespace std;



int main() 
{
	string str1, str2; 
	while (cin >> str1 >> str2)
	{
		if (str1.find(str2) != string::npos)
			cout << str1.find(str2)+1 << endl;
		else cout << "-1" << endl;
	}

	return 0;
}

Double click to view unformatted code.


Back to problem 3832