/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 28ms 4.238 MiB
#3 Accepted 27ms 4.129 MiB
#4 Accepted 27ms 4.27 MiB
#5 Accepted 26ms 4.27 MiB
#6 Accepted 27ms 4.336 MiB

Code

#include <bits/stdc++.h>
#define int long long
#define sqrt(x) sqrtl(x)
using namespace std;

namespace solve {
  namespace test_case {
    void main() {
      int n; cin >> n;
      vector<int> v(n);
      map<int, int> mp;
      for (auto &i : v) cin >> i, mp[i]++;
      for (auto &[x, y] : mp) {
        if (y == 1) {
          cout << x << '\n';
          break;
        }
      }
    }
  }

  void main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t (1); //cin >> t; 
    while (t--) {
      test_case::main();
    }
  }
}

signed main() { solve::main(); } 

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:38:08
Judged At
2024-10-03 15:38:08
Judged By
Score
100
Total Time
28ms
Peak Memory
4.336 MiB