31322023-02-19 12:20:31horvathabelKéséscpp17Accepted 50/50441ms42612 KiB

#include <bits/stdc++.h>
using namespace std;
using ll=long long; 
int main() {
	int n; 
	cin>>n;
	map<ll, int> m;
	set<ll> evszam;
	for (int i=0; i<n;i++){
		ll x; 
		cin>>x;
		m[x]=i+1; 
		evszam.insert(x);
	}
	int ans=2000001; 
	for (int x:evszam){
		ans=min(ans, m[x]); 
	}
	cout<<ans; 
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1808 KiB
2Accepted0/017ms4032 KiB
3Accepted5/53ms2212 KiB
4Accepted5/53ms2272 KiB
5Accepted5/582ms2556 KiB
6Accepted5/582ms2504 KiB
7Accepted4/4273ms30244 KiB
8Accepted4/4268ms29504 KiB
9Accepted4/4289ms26024 KiB
10Accepted4/4247ms23308 KiB
11Accepted4/4248ms20348 KiB
12Accepted2/2275ms21908 KiB
13Accepted2/2375ms42612 KiB
14Accepted1/1425ms41820 KiB
15Accepted1/1441ms41008 KiB
16Accepted1/1296ms33796 KiB
17Accepted1/1266ms24264 KiB
18Accepted1/1159ms5900 KiB
19Accepted1/1146ms5044 KiB