【链接】 我是链接,点我呀:)
【题意】
【题解】
傻逼模拟【代码】
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int n;
int a[N+100];
int main(){
#ifdef LOCAL_DEFINE
freopen("F:\c++source\rush_in.txt", "r", stdin);
#endif
for (int i = 0;i <= N;i++)
a[i] = N+100;
scanf("%d",&n);
for (int i = 1;i <= n;i++){
int x;
scanf("%d",&x);
a[x] = i;
}
int ma = N+10,idx = 1;
for (int i = 0;i <= N;i++)
if (a[i]<ma){
ma = a[i];
idx = i;
}
printf("%d
",idx);
return 0;
}