PAT 甲级 1041 Be Unique
作者:互联网
PAT 甲级 1041 Be Unique
#include <bits/stdc++.h>
using namespace std;
int main()
{
#ifdef LOCAL
freopen("input.txt", "r", stdin);
#endif
vector<int> book(10010, 0);
int n = 0;
cin >> n;
vector<int> bet(n);
for (auto& i : bet) {
cin >> i;
book[i]++;
}
int i = 0;
for (i = 0; i < n; ++i) {
if (book[bet[i]] == 1) {
cout << bet[i];
break;
}
}
if (i == n)
cout << "None";
}
标签:1041,PAT,int,book,Unique,bet 来源: https://blog.csdn.net/u011917745/article/details/114833564