/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 28ms 4.27 MiB
#3 Accepted 26ms 4.27 MiB
#4 Accepted 28ms 4.27 MiB
#5 Accepted 52ms 4.27 MiB
#6 Accepted 27ms 4.316 MiB

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-10-03 17:57:12
Judged By
Score
100
Total Time
52ms
Peak Memory
4.316 MiB