Accepted
Code
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(){
ll n; cin>>n;
map<int,int>mp;
for(int i=0;i<n;i++){
int x; cin>>x;
mp[x] ++;
}
for(auto[x,y] : mp){
if(y==1){
cout<<x<<endl;
return;
}
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int t=1; //cin>>t;
while(t--){
solve();
}
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 15:49:04
- Judged At
- 2024-12-17 11:35:58
- Judged By
- Score
- 100
- Total Time
- 26ms
- Peak Memory
- 2.766 MiB