/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 33ms 1.152 MiB
#3 Accepted 33ms 1.012 MiB
#4 Accepted 32ms 1.102 MiB
#5 Accepted 33ms 1.027 MiB
#6 Accepted 33ms 1.012 MiB

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