/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 768.0 KiB
#2 Accepted 25ms 2.996 MiB
#3 Accepted 23ms 3.02 MiB
#4 Accepted 24ms 3.219 MiB
#5 Accepted 28ms 3.227 MiB
#6 Accepted 31ms 3.207 MiB

Code

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) (x).begin(), (x).end()
#define f(i, n) for (int i = 0; i < n; i++)
#define trace(x) cerr << #x << ": " << x << '\n'

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++)
        cin >> a[i];
    map<int, int> m;
    for (auto x : a)
        m[x]++;
    for (auto [a, b] : m)
    {
        if (b == 1)
        {
            cout << a << endl;
            break;
        }
    }

    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:33:32
Judged At
2024-10-03 15:33:32
Judged By
Score
100
Total Time
31ms
Peak Memory
3.227 MiB