/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 30ms 4.215 MiB
#3 Accepted 30ms 4.34 MiB
#4 Accepted 30ms 4.289 MiB
#5 Accepted 30ms 4.32 MiB
#6 Accepted 30ms 4.223 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-12-17 11:36:31
Judged By
Score
100
Total Time
30ms
Peak Memory
4.34 MiB