/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 536.0 KiB
#2 Accepted 17ms 2.602 MiB
#3 Accepted 17ms 2.613 MiB
#4 Accepted 18ms 2.688 MiB
#5 Accepted 17ms 2.723 MiB
#6 Accepted 17ms 2.645 MiB

Code

// Online C++ compiler to run C++ program online
#include <iostream>
#include "unordered_map"
#include "algorithm"
using namespace std;

int main() {
    ios :: sync_with_stdio(false);
    cin.tie(0);
    
    int tc = 1;
    //cin>>tc;
    while(tc--){
        int n;
        cin>>n;
        unordered_map<int,int>ump;
        for(int i=0;i<n;i++){
            int it;
            cin>>it;
            ump[it]++;
        }
        for(auto it:ump){
            if(it.second == 1){
                cout<<it.first<<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 16:37:17
Judged At
2024-12-17 11:34:26
Judged By
Score
100
Total Time
18ms
Peak Memory
2.723 MiB