#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
vector<int> vec1={,,,,,,,};
vector<int> vec2={,};
decltype(vec1.size()) j=,m=;
for(decltype(vec1.size()) i=;i<vec1.size();++i)
{
m=i;
j=;
while(j<vec2.size())
{
if(vec1[i]==vec2[j])
{
i++;
j++;
}
else
{
break;
}
}
if(j==vec2.size())
{
break;
}
i=m;
}
if(j==vec2.size())
{
cout<<"true"<<endl;
}
else
cout<<"false"<<endl;
return ;
}
运行结果: