/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 560.0 KiB
#2 Accepted 32ms 1.285 MiB
#3 Accepted 34ms 1.5 MiB
#4 Accepted 34ms 1.285 MiB
#5 Accepted 55ms 1.285 MiB
#6 Accepted 50ms 1.289 MiB

Code

// In the name of ALLAH, The Most Gracious and The Most Merciful
// Muhammad Abdur Rahman Muaj
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lln ll n;cin>>n;
#define vl vector<ll>
#define vln vector<ll>a(n);
#define vs vector<string>
#define pb push_back
#define pp pop_back
#define yes cout <<  "YES\n";
#define no cout <<  "NO\n";
#define yno (f?"YES":"NO");
#define f(x) for(ll i=0; i<x; i++)
#define f1(x) for(ll i=1;i<=x;i++)
#define fo(o,x) for(ll i=o;i<x;i++)
#define fla f(n)cin>>a[i];
#define sumall(a) accumulate(begin(a),end(a),0);
#define so(x) sort(x.begin(), x.end());
#define revsort(x) sort(x.begin(), x.end(), std::greater<int>());
#define mem(a,b) memset(a, b, sizeof(a) )
int main(){
lln
vln
fla
so(a)
ll c=0;
f(n){
    if(a[i]!=a[i+1]){
        if(a[i]!=a[i-1]){c=a[i];break;}
        else continue;
    }
}
cout<<c;

}

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:45:29
Judged At
2024-10-03 15:45:29
Judged By
Score
100
Total Time
55ms
Peak Memory
1.5 MiB