Accepted
Code
#include<bits/stdc++.h>
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define ll long long
#define endl '\n'
using namespace std;
int main()
{
optimize();
int n,c=0;
cin>>n;
vector<ll>v(n);
map<ll,ll>m;
vector<ll>v1;
for(auto &u:v)
{
cin>>u;
m[u]++;
}
for(auto u:m)
{
if(u.second==1)v1.push_back(u.first);
}
for(auto u:v1)cout<<u<<" ";
cout<<endl;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1095 Uncovering the Lone Heart
- Contest
- Brain Booster #6
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-10-03 17:57:12
- Judged At
- 2024-11-11 02:45:22
- Judged By
- Score
- 100
- Total Time
- 41ms
- Peak Memory
- 4.273 MiB