Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <fstream>
- int main() {
- setlocale(LC_ALL, "ru");
- std::ifstream fin("input.txt");
- std::string a, b;
- fin >> a >> b;
- int index = 0, size = a.size();
- for (int i = 0; i < b.size(); i++) {
- if (b[i] == a[index]) {
- index++;
- if (index == size) {
- std::cout << "True" << std::endl;
- return 0;
- }
- }
- }
- std::cout << "False" << std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment