Problem

5/8

删除元素 - 2

Problem

给定一个包含 N 个元素的数组。  去除不均匀的对称元素。

第一行包含数字N(1<=N<=15)  -一维数组的元素个数
第二行N个整数(数字是键盘输入的)

示例输入和输出
<正文>
测试编号 输入数据 印记
1 <分区> 5 <分区> 1 0 2 0 0 0 2 0
2 <分区> 6 <分区> 4 0 1 4 5 4  4 4
Write the program below
#include <iostream>
#include <vector>
using namespace std;
int main()
{
	int n;
	vector<int> myvector;    
       cin>>n;
       for(int i=0;i<n;i++)
         {
          int a;
          cin>>a;
         myvector.push_back(a);
         }
  
for (auto now : myvector) {
		cout << now << " ";
	}
}
      

     

Program check result

To check the solution of the problem, you need to register or log in!