/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 25ms 3.559 MiB
#3 Accepted 26ms 3.52 MiB
#4 Accepted 27ms 3.422 MiB
#5 Accepted 26ms 3.52 MiB
#6 Accepted 26ms 3.602 MiB

Code

#include<bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define prime_number[21]={11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}
///POLICY BASED DATA STRUCTURE..
///order_of_key return number of element which are strictly greater/smaller than x..
///find_by_order return ans iterator corresponding to the xth position of the set..
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag, tree_order_statistics_node_update>
#define ll long long int
#define faster_bro ios_base::sync_with_stdio(false);cin.tie(NULL)
#define esp 0.0000000001
#define ss second
#define ff first
#define nl cout<<endl
//memset(ar,-1,sizeof(ar));
// (1LL<<i) more than efficient pow(2,i);
void fast(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
}

int main(){
    fast();
    int tc=1;
  //  cin>>tc;
    int h=1;
    while(tc--){
        ll a,b,c,sum=0,sum1=0,sum2=0,cnt=0,mx=LLONG_MIN,mn=LLONG_MAX,mx1=-1e18,mx2=-1e18;
        cin>>a;

        map<ll,ll>mp;
        for(int i=1;i<=a;i++){
            ll x;
            cin>>x;
            mp[x]++;
        }
        for(auto it:mp){
            if(it.ss==1){
                cout<<it.ff<<endl;
                break;
            }
        }

    }

}

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:44:04
Judged At
2024-10-03 15:44:04
Judged By
Score
100
Total Time
27ms
Peak Memory
3.602 MiB