/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 332.0 KiB
#2 Accepted 35ms 3.18 MiB
#3 Accepted 35ms 3.184 MiB
#4 Accepted 34ms 3.125 MiB
#5 Accepted 36ms 3.176 MiB
#6 Accepted 34ms 3.18 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-12-17 11:36:53
Judged By
Score
100
Total Time
36ms
Peak Memory
3.184 MiB