class Substr {
public:
vector<bool> chkSubStr(vector<string> p, int n, string s) {
// write code here
vector<bool> ret;
if( n<=0 )
{
return ret;
}
for(string str: p)
{
//找不到,返回位置为-1;
if( -1 != s.find(str,0) )
{
ret.push_back( true );
}
else
{
ret.push_back( false );
}
}
return ret;
}
}; 
京公网安备 11010502036488号