18352022-12-04 18:54:12levente19Késéscpp11Accepted 50/50190ms20440 KiB
#include <bits/stdc++.h>

using namespace std;

int main() {
    int N;
    cin >> N;
    map<int, int> o;

    for(int i = 1; i <= N; i++) {
        int ev;
        cin >> ev;
        o[ev] = i;
    }

    int megoldas = INT_MAX;
    for(auto& [kulcs, ertek] : o) {
        if(megoldas > ertek) megoldas = ertek;
    }

    cout << megoldas;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1688 KiB
2Accepted0/012ms2764 KiB
3Accepted5/52ms2124 KiB
4Accepted5/52ms2204 KiB
5Accepted5/565ms2504 KiB
6Accepted5/565ms2704 KiB
7Accepted4/4151ms14676 KiB
8Accepted4/4146ms14316 KiB
9Accepted4/4143ms13036 KiB
10Accepted4/4136ms11824 KiB
11Accepted4/4135ms10648 KiB
12Accepted2/2158ms11240 KiB
13Accepted2/2190ms20440 KiB
14Accepted1/1190ms20176 KiB
15Accepted1/1184ms20120 KiB
16Accepted1/1174ms17016 KiB
17Accepted1/1162ms12908 KiB
18Accepted1/1123ms4960 KiB
19Accepted1/1118ms4464 KiB