18372022-12-04 18:55:00levente19Késéscpp11Accepted 50/50123ms20828 KiB
#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    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/03ms1828 KiB
2Accepted0/08ms2812 KiB
3Accepted5/52ms2396 KiB
4Accepted5/52ms2584 KiB
5Accepted5/535ms2928 KiB
6Accepted5/537ms3136 KiB
7Accepted4/4105ms14976 KiB
8Accepted4/4101ms14640 KiB
9Accepted4/497ms13216 KiB
10Accepted4/494ms12104 KiB
11Accepted4/492ms10868 KiB
12Accepted2/2100ms11740 KiB
13Accepted2/2123ms20828 KiB
14Accepted1/1123ms20616 KiB
15Accepted1/1122ms20152 KiB
16Accepted1/1112ms17284 KiB
17Accepted1/1101ms13112 KiB
18Accepted1/167ms5408 KiB
19Accepted1/161ms4988 KiB