/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 27ms 3.562 MiB
#3 Accepted 27ms 3.453 MiB
#4 Accepted 26ms 3.52 MiB
#5 Accepted 29ms 3.461 MiB
#6 Accepted 27ms 3.438 MiB

Code

#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define ld long double
#define endl '\n'
#define MIR183_PC ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define yes cout << "YES" << endl
#define no cout << "NO" << endl

void solve() {
    // Your code here
    ll n;
    cin>>n;
    map<ll,ll> mp;
    for(ll i=0;i<n;i++) {
        ll x;
        cin>>x;
        mp[x]++;
    }
    for(auto [x,y]:mp) {
        if(y==1) {
            cout<<x<<endl;
            break;
        }
    }
}

signed main() {
    MIR183_PC;
    // Always use ll, int may give TLE
    ll tt;
    tt=1;
    // cin >> tt;
    while (tt--) {
        solve();
    }
    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:44:24
Judged At
2024-10-03 15:44:24
Judged By
Score
100
Total Time
29ms
Peak Memory
3.562 MiB