1 vector<int>::iterator result = find( L.begin( ), L.end( ), 1 ); //查找1
2     if ( result == L.end( ) ) //没找到
3         cout << "No" << endl;
4     else //找到
5         cout << "Yes" << endl;
6 
7 }

 

相关文章:

  • 2021-07-25
  • 2021-10-06
  • 2021-12-17
  • 2021-09-26
  • 2021-09-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2021-12-27
相关资源
相似解决方案