View Code of Problem 3832

#include <stdio.h>
#include<iostream>
#include<cstdlib>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<stack>
using namespace std;
string a;
string b;
int main() {
	while (cin >> a >> b) {
		int aa;
		aa = a.find(b);
		if(aa!=-1){
		cout << aa+1 << endl;
		}
		else {
			cout <<"-1"<< endl;
		}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3832