- 再来个C++版本,防止python3到时候搞不定
#include <iostream>
#include <set>
using namespace std;
int main() {
string s, t;
bool flag;
while (cin >> s >> t) { // 注意 while 处理多个 case
set<char> set;
for (char ch : t) {
set.insert(ch);
}
flag = true;
for (char ch : s) {
if (!set.count(ch)) {
flag = false;
break;
}
}
if (flag) {
cout << "true" << endl;
}
else {
cout << "false" << endl;
}
}
return 0;
}
// 64 位输出请用 printf("%lld")



京公网安备 11010502036488号