Accepted
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