题解 | #字符串字符匹配#
字符串字符匹配
https://www.nowcoder.com/practice/22fdeb9610ef426f9505e3ab60164c93
15行秒杀,我知道它不快,但是它短呀。。。
#include <bits/stdc++.h> using namespace std; int main(){ string s, t; cin>> s>> t; bool flag= true; for(int i= 0; i< s.length(); ++i) if(t.find(s[i])== -1) flag = false; if(flag) cout<< "true"; else cout<< "false"; }