/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 28ms 2.82 MiB
#3 Accepted 27ms 2.816 MiB
#4 Accepted 26ms 2.77 MiB
#5 Accepted 29ms 2.77 MiB
#6 Accepted 26ms 2.586 MiB

Code

#include <stdio.h>
#include <map>

int main() {
    int n;
    scanf("%d", &n);
    std::map<int, int> a;
    for (int x; n--;) scanf("%d", &x), ++a[x];
    for (auto [x, y] : a) {
	if (y == 1) {
	    printf("%d", x);
	    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 16:10:58
Judged At
2024-10-03 16:10:58
Judged By
Score
100
Total Time
29ms
Peak Memory
2.82 MiB