/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 30ms 4.27 MiB
#3 Accepted 30ms 4.188 MiB
#4 Accepted 30ms 4.348 MiB
#5 Accepted 30ms 4.23 MiB
#6 Accepted 30ms 4.324 MiB

Code

#include <bits/stdc++.h>
#include <cmath>
#include <bitset>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>pbds;
#define ll  long long  int
#define yes cout << "Yes" << endl
#define no cout << "No" << endl
#define    gcd(a,b)         __gcd(a,b)
#define    lcm(a,b)        ((a*b)/gcd(a,b))
#define    pi               acos(-1.00)
const ll mod=1000000007;
 
void evan(int t) {
 ll n;cin>>n;
 ll a[n];
 map<ll,ll>m;
 for(int i=0;i<n;i++){cin>>a[i];m[a[i]]++;}
 for(auto &it:m){
  if(it.second==1){cout<<it.first<<"\n";break;}
 }
}
signed main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(nullptr);
    ll t=1;
 // cin>>t;
     for(int i=1;i<=t;i++){ 
         evan(i);
       }
}

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:37:34
Judged At
2024-12-17 11:36:34
Judged By
Score
100
Total Time
30ms
Peak Memory
4.348 MiB