/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Accepted 25ms 3.121 MiB
#3 Accepted 25ms 3.219 MiB
#4 Accepted 25ms 3.184 MiB
#5 Accepted 25ms 3.18 MiB
#6 Accepted 25ms 3.133 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-11-11 02:51:03
Judged By
Score
100
Total Time
25ms
Peak Memory
3.219 MiB