15222022-11-22 00:06:56TomaSajtKéséscpp14Accepted 50/50138ms20380 KiB
#include <bits/stdc++.h>
#define speed ios::sync_with_stdio(0);cin.tie(0)
using namespace std;

int main() {
    speed;
    int n; cin >> n;
    map<int, int> t;
    for (int i = 1; i <= n; i++) {
        int a; cin >> a;
        t[a] = i;
    }
    int res = INT_MAX;
    for (auto& [k, v] : t) {
        if (res > v) res = v;
    }
    cout << res;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1832 KiB
2Accepted0/08ms2840 KiB
3Accepted5/52ms2388 KiB
4Accepted5/52ms2588 KiB
5Accepted5/535ms2936 KiB
6Accepted5/535ms2760 KiB
7Accepted4/4101ms14516 KiB
8Accepted4/498ms14212 KiB
9Accepted4/493ms12892 KiB
10Accepted4/493ms11748 KiB
11Accepted4/487ms10796 KiB
12Accepted2/297ms11344 KiB
13Accepted2/2138ms20380 KiB
14Accepted1/1119ms20212 KiB
15Accepted1/1120ms20100 KiB
16Accepted1/1109ms17132 KiB
17Accepted1/1100ms13096 KiB
18Accepted1/164ms5032 KiB
19Accepted1/157ms4576 KiB