#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#define N 10010
int main(void) {
int *arr, *arr2, n, i, tmp;
arr = (int *)calloc(N, sizeof(int));
scanf("%d", &n);
arr2 = (int *)calloc(n, sizeof(int));
for (i = 0; i < n; i++) {
scanf("%d", &tmp);
arr[tmp]++;
arr2[i] = tmp;
}
for (i = 0; i < n; i++) {
if (arr[arr2[i]] == 1) {
printf("%d\n", arr2[i]);
break;
}
}
if (i == n) {
puts("None");
}
free(arr);
free(arr2);
return 0;
}
1041. Be Unique (20)解题报告
最新推荐文章于 2019-02-02 10:18:40 发布