#include <bits/stdc++.h> using namespace std; #define MAX 999999 int main() { string a, b; while (cin >> a >> b) { int pos = a.find(b); if (pos == -1) cout << pos << endl; else cout << pos+1 << endl; } } |
Double click to view unformatted code.