/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 26ms 2.844 MiB
#3 Accepted 26ms 2.805 MiB
#4 Accepted 26ms 2.664 MiB
#5 Accepted 26ms 2.785 MiB
#6 Accepted 27ms 2.852 MiB

Code

// Created on: 2024-10-03 20:36
// Author: Safwan_Ibrahim
    
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define endl '\n'

int32_t main()
{   
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n; cin >> n;

    map<int,int>mp;

    for (int i = 1; i <= n; i++) {
        int a; cin >> a;
        mp[a]++;
    }


    for (auto [x , y] : mp) {
        if (y == 1) {
            cout << x << endl;
            return 0;
        }
    }

    
    
    return 0;
} 

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 15:38:45
Judged At
2024-10-03 15:38:45
Judged By
Score
100
Total Time
27ms
Peak Memory
2.852 MiB