/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 32ms 4.316 MiB
#3 Accepted 35ms 4.207 MiB
#4 Accepted 34ms 4.145 MiB
#5 Accepted 35ms 4.242 MiB
#6 Accepted 33ms 4.312 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-12-17 11:32:07
Judged By
Score
100
Total Time
35ms
Peak Memory
4.316 MiB