Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // E.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <cmath>
- #include <algorithm>
- #include <vector>
- #include <string>
- using namespace std;
- typedef long long ll;
- typedef long double ld;
- typedef unsigned long long ull;
- typedef string str;
- int main()
- {
- str s, t;
- cin >> s >> t;
- for (int i = 0; i < s.size(); i++)
- {
- int j;
- for (j = 0; j < t.size() && i + j < s.size(); j++)
- {
- if (s[i + j] != t[j])
- break;
- }
- if (j == t.size())
- {
- for (j = i; j < s.size(); j++)
- cout << s[j];
- cout << endl;
- system("pause");
- return 0;
- }
- }
- cout << "NO SOLUTION" << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement