思路 将输入数据采用字符串接收,然后根据 string 的 find 方法来查找是否有子串的方式来判断 l 中是否包含 r。 代码 #include <iostream> #include <vector> #include <string> #include <set> #include <map> using namespace std; struct strComp { bool operator() (const string& s1, const string& s2) { ...