75432024-01-09 13:48:46AblablablaKéséscpp17Accepted 50/50194ms20380 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;

    map<int, int> utolso;
    for(int i = 0; i < n; i++){
        int a;
        cin >> a;

        utolso[a] = i;
    }

    int mini = 2e9 + 7;
    for(auto x : utolso){
        mini = min(mini, x.second);
    }

    cout << mini + 1 << "\n";
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1816 KiB
2Accepted0/013ms2840 KiB
3Accepted5/53ms2260 KiB
4Accepted5/53ms2340 KiB
5Accepted5/568ms2700 KiB
6Accepted5/568ms2912 KiB
7Accepted4/4155ms14884 KiB
8Accepted4/4150ms14540 KiB
9Accepted4/4144ms12852 KiB
10Accepted4/4149ms11740 KiB
11Accepted4/4136ms10676 KiB
12Accepted2/2164ms11516 KiB
13Accepted2/2194ms20380 KiB
14Accepted1/1194ms20104 KiB
15Accepted1/1188ms19648 KiB
16Accepted1/1180ms16508 KiB
17Accepted1/1168ms12380 KiB
18Accepted1/1126ms4568 KiB
19Accepted1/1120ms4032 KiB