/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 324.0 KiB
#2 Accepted 30ms 3.449 MiB
#3 Accepted 30ms 3.609 MiB
#4 Accepted 30ms 3.516 MiB
#5 Accepted 30ms 3.383 MiB
#6 Accepted 30ms 3.523 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-11-11 02:40:17
Judged By
Score
100
Total Time
30ms
Peak Memory
3.609 MiB