Accepted
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a;
for(int i=0;i<n;i++){
int x;
cin >> x;
a.push_back(x);
}
for(int i=1;i<n;i++){
if(a[i] == a[i-1])
a[i] = 0, a[i-1] = 0;
}
for(int i=0;i<n;i++){
if(a[i] != 0){
cout << a[i];
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:47:48
- Judged At
- 2024-11-11 02:50:00
- Judged By
- Score
- 100
- Total Time
- 33ms
- Peak Memory
- 1.152 MiB