19102022-12-09 22:21:52kdbKéséscpp11Accepted 50/50163ms20448 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;


int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int n;
    cin >> n;
    map<int, int>m;
    for (size_t i = 0; i < n; i++)
    {
        int a;
        cin >> a;
        m[a] = i + 1;
    }
    int q = n + 1;
    for (auto i : m)
    {
        if (q > i.second) q = i.second;
    }
    cout << q << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1824 KiB
2Accepted0/08ms2852 KiB
3Accepted5/52ms2384 KiB
4Accepted5/52ms2588 KiB
5Accepted5/537ms2552 KiB
6Accepted5/537ms3008 KiB
7Accepted4/4104ms14840 KiB
8Accepted4/4103ms14408 KiB
9Accepted4/4101ms13024 KiB
10Accepted4/4107ms11952 KiB
11Accepted4/497ms10724 KiB
12Accepted2/2112ms11596 KiB
13Accepted2/2163ms20448 KiB
14Accepted1/1137ms20148 KiB
15Accepted1/1155ms19708 KiB
16Accepted1/1115ms16724 KiB
17Accepted1/1105ms12552 KiB
18Accepted1/167ms4464 KiB
19Accepted1/161ms4100 KiB