Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) (x).begin(), (x).end()
#define f(i, n) for (int i = 0; i < n; i++)
#define trace(x) cerr << #x << ": " << x << '\n'
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
map<int, int> m;
for (auto x : a)
m[x]++;
for (auto [a, b] : m)
{
if (b == 1)
{
cout << a << endl;
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 15:33:32
- Judged At
- 2024-12-17 11:36:53
- Judged By
- Score
- 100
- Total Time
- 36ms
- Peak Memory
- 3.184 MiB