/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 16ms 2.727 MiB
#3 Accepted 17ms 2.684 MiB
#4 Accepted 17ms 2.742 MiB
#5 Accepted 17ms 2.742 MiB
#6 Accepted 17ms 2.719 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-11-11 02:48:03
Judged By
Score
100
Total Time
17ms
Peak Memory
2.742 MiB