当前位置:网站首页>Deletes all specified elements in the vector
Deletes all specified elements in the vector
2022-04-23 00:22:00 【I'll go to bed again】
//
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> v;
vector<int>::iterator it;
int n,i,ask;
while( cin>>n )
{
v.resize(n);
for( i=0;i<n;i++ ) cin>>v[i];
cin>>ask;
while( find( v.begin(),v.end(),ask )!=v.end() )
{
it=find( v.begin(),v.end(),ask );
v.erase( it ); // v.erase( it );
}
for( i=0;i<v.size();i++ )
{
if( i ) cout<<" ";
cout<<v[i];
}
cout<<endl;
}
return 0;
}
// 5
// 1 2 2 2 4
// 2
// 1 4
版权声明
本文为[I'll go to bed again]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204222153581708.html
边栏推荐
- Installation and use of scvi tutorial
- 99 multiplication table code
- Dialogue with Yang jiongwei, fast is reflected in seizing the "bonus". In fact, tob company should run slower
- ArcGIS 城市生活区用地适宜性评价(四)
- ArcGIS 城市生活区用地适宜性评价(五)
- Vibrato tiktok
- 层次分析法软件操作步骤(yaahp)
- (转)Aspose.words编程指南之DOM树再识,各层结构之间的关系
- ArcGIS 城市生活区用地适宜性评价(三)
- According to this effective method, UI automation testing is so simple
猜你喜欢

Beifu scope view oscilloscope reads the signal of configuration IO

微软官网下载Net Framework流程

Migrate AWS S3 data to tidb cloud cluster

scanpy find resolution

三菱MR-JE-C伺服应用详细介绍

Error runtimeerror when MySQL runs workbench

【图像分类】 一文读懂AlexNet

(transfer) how winscp (SSH FTP client) generates the key to log in Linu

js -对连续月份数据做处理拆分

(transfer) Aspose Documentbuilder II of words Programming Guide
随机推荐
Nodejs + Express login authentication and registration
ArcGIS 城市生活区用地适宜性评价(三)
国产化浪潮下TiDB解决的痛点问题
微软官网下载Net Framework流程
植被物候參數遙感研究進展(好文分享)
ArcGIS 制作3D规划图纸
Array de duplication - basic data type
Node + mongoose paging effect
Application of tidb in massive transactions and real-time analysis of fast food chain enterprises
ArcMAP 使用绘图工具添加注记
2022年4月22日,第15天
倍福Scaling factor因子计算
(turn to) C # best tool set: IDE, analysis, automation tools, etc
Nodejs learning notes
Beifu el5101 module obtains the feedback position of the grating ruler and binds it to the NC axis configuration
According to this effective method, UI automation testing is so simple
USPS dataset_ Kmeans Usage Summary
ArcGIS 计算地块容积率
倍福NC轴走速度模式
TiDB 在连锁快餐企业丨海量交易与实时分析的应用探索