/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 27ms 3.52 MiB
#3 Accepted 27ms 3.52 MiB
#4 Accepted 27ms 3.562 MiB
#5 Accepted 27ms 3.465 MiB
#6 Accepted 27ms 3.52 MiB

Code

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define ld long double
#define ull unsigned long long
#define lcm(a,b) ((a*b)/__gcd(a,b))
const int MOD = 1000000007;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    
    int n;
    cin >> n;
    map <ll, ll> mp;

    while(n--){
        int x;
        cin >> x;
        mp[x]++;
    }

    for (auto &i : mp){
        if (i.second == 1 ){
            cout << i.first << endl;
            return 0;
        }
    }

}

Information

Submit By
Type
Submission
Problem
P1095 Uncovering the Lone Heart
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-05 07:44:57
Judged At
2024-10-05 07:44:57
Judged By
Score
100
Total Time
27ms
Peak Memory
3.562 MiB