/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 23ms 2.648 MiB
#3 Accepted 23ms 2.602 MiB
#4 Accepted 22ms 2.82 MiB
#5 Accepted 24ms 2.816 MiB
#6 Accepted 23ms 2.77 MiB

Code

#include <bits/stdc++.h>
#define ll long long
int const p = 1e9+7;
#define pb push_back



//Check
// bool isPrime(ll n){if(n<=1)return false;if(n<=3)return true;if(n%2==0||n%3==0)return false;for(int i=5;i*i<=n;i=i+6)if(n%i==0||n%(i+2)==0)return false;return true;}
// bool isPowerOfTwo(ll n){if(n==0)return false;return (ceil(log2(n)) == floor(log2(n)));}
// bool isPerfectSquare(ll x){if (x >= 0) {ll sr = sqrt(x);return (sr * sr == x);}return false;}
// int exponentMod(int A, int B, int C) 
// { 
//     if (A == 0) return 0; 
//     if (B == 0) return 1; 
//     long long y; 
//     if(B % 2 == 0){ 
//         y = exponentMod(A, B / 2, C); 
//         y = (y * y) % C; 
//     }else { 
//         y = A % C; 
//         y = (y * exponentMod(A, B - 1, C) % C) % C; 
//     } 
//     return (int)((y + C) % C); 
// } 
 
using namespace std;

int main() {
    ios::sync_with_stdio(false); cin.tie(0);
    int n; cin >> n;
    map<int,int>m;
    for(int i = 0; i<n; ++i){
        int x; cin >> x;
        m[x]++;
    } 
    for(auto &i:m){
        if(i.second==1){
            cout << i.first << '\n';
        }
    }
}

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:41:53
Judged At
2024-10-03 15:41:53
Judged By
Score
100
Total Time
24ms
Peak Memory
2.82 MiB