Time Exceeded
Code
#include <stdio.h>
int main() {
int N;
scanf("%d", &N);
int A[N];
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
}
int ans[N];
for (int i = 0; i < N; i++) {
ans[i] = 0;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (A[i] == A[j]) {
ans[i]++;
}
}
}
for (int i = 0; i < N; i++) {
if (ans[i] == 1) {
printf("%d\n", A[i]);
break;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1095 Uncovering the Lone Heart
- Contest
- Brain Booster #6
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-10-03 16:40:29
- Judged At
- 2024-11-11 02:47:51
- Judged By
- Score
- 10
- Total Time
- ≥1093ms
- Peak Memory
- ≥1.039 MiB