150852025-02-12 13:46:37markfsibianKéséscpp17Accepted 50/50211ms8756 KiB
// keses.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <map>
#include <algorithm>
#include <climits>

using namespace std;
map<int, int> v;

int main()
{
    int n;
    cin >> n;
    int t;
    for (int i = 1; i <= n; ++i)
    {
        cin >> t;
        v.insert_or_assign(t, i);
    }

    int maxi = INT_MAX;
    for (auto& e : v)
        if (maxi > e.second)
            maxi = e.second;

    cout << maxi;
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms316 KiB
2Accepted0/010ms564 KiB
3Accepted5/51ms316 KiB
4Accepted5/52ms316 KiB
5Accepted5/565ms508 KiB
6Accepted5/565ms440 KiB
7Accepted4/4152ms6236 KiB
8Accepted4/4159ms5940 KiB
9Accepted4/4145ms5172 KiB
10Accepted4/4157ms4660 KiB
11Accepted4/4137ms3892 KiB
12Accepted2/2172ms4232 KiB
13Accepted2/2203ms8756 KiB
14Accepted1/1211ms8500 KiB
15Accepted1/1203ms8500 KiB
16Accepted1/1194ms6708 KiB
17Accepted1/1172ms4660 KiB
18Accepted1/1126ms848 KiB
19Accepted1/1120ms648 KiB