/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 24ms 2.77 MiB
#3 Accepted 24ms 2.77 MiB
#4 Accepted 24ms 2.77 MiB
#5 Accepted 23ms 2.812 MiB
#6 Accepted 23ms 2.77 MiB

Code

#include <bits/stdc++.h>
using namespace std;
const int n = 1e5 + 7;
int arr[n];
int main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  map<int, int>m;
  int n;
  cin >> n;
  for(int i = 1; i <= n; i++){
    int x; cin >> x;
    m[x] += 1;
  }
  for(auto x : m){
    if(x.second == 1){
      cout << x.first;
      break;
    }
  }
  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 16:39:56
Judged At
2024-10-03 16:39:56
Judged By
Score
100
Total Time
24ms
Peak Memory
2.812 MiB