#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
vector<string> v1 = {"A","B","C"};
vector<string> v3 = {"A","C","C"};
vector<string> v2 = {"X","Y","A","B","C","D"};
auto res = search(begin(v2), end(v2), begin(v1), end(v1));
auto found = res != end(v2);
cout << boolalpha << found;
auto res2 = search(begin(v2), end(v2), begin(v3), end(v3));
auto found2 = res2 != end(v2);
cout << boolalpha << found2;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJdmVjdG9yPHN0cmluZz4gdjEgPSB7IkEiLCJCIiwiQyJ9OwoJdmVjdG9yPHN0cmluZz4gdjMgPSB7IkEiLCJDIiwiQyJ9OwoJdmVjdG9yPHN0cmluZz4gdjIgPSB7IlgiLCJZIiwiQSIsIkIiLCJDIiwiRCJ9OwoJCglhdXRvIHJlcyA9IHNlYXJjaChiZWdpbih2MiksIGVuZCh2MiksIGJlZ2luKHYxKSwgZW5kKHYxKSk7CglhdXRvIGZvdW5kID0gcmVzICE9IGVuZCh2Mik7Cgljb3V0IDw8IGJvb2xhbHBoYSA8PCBmb3VuZDsKCQoJYXV0byByZXMyID0gc2VhcmNoKGJlZ2luKHYyKSwgZW5kKHYyKSwgYmVnaW4odjMpLCBlbmQodjMpKTsKCWF1dG8gZm91bmQyID0gcmVzMiAhPSBlbmQodjIpOwoJY291dCA8PCBib29sYWxwaGEgPDwgZm91bmQyOwoJCgkKCXJldHVybiAwOwp9