View difference between Paste ID: m1hFzm6h and xCnFwZWD
SHOW: | | - or go back to the newest paste.
1
#include <iostream>
2
#include <vector>
3
#include <algorithm>
4
using namespace std;
5
6
int main()
7
{
8
	int n,i;
9
	vector<int>V;
10
	vector<int>::iterator it;
11
	cin>>n;
12
	while(n--) 
13
	{
14
		cin>>i;
15
		V.push_back(i);
16
	}
17
	cin>>n;
18
	//it = find(V.begin(),V.end(),n);
19
	V.erase(find(V.begin(),V.end(),n));
20
	for(it=V.begin();it!=V.end();it++) cout<<*it<<endl;
21
	return 0;
22
}