150852025-02-12 13:46:37markfsibianKéséscpp17Elfogadva 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
RészfeladatÖsszpontTesztVerdiktIdőMemória
base50/50
1Elfogadva0/01ms316 KiB
2Elfogadva0/010ms564 KiB
3Elfogadva5/51ms316 KiB
4Elfogadva5/52ms316 KiB
5Elfogadva5/565ms508 KiB
6Elfogadva5/565ms440 KiB
7Elfogadva4/4152ms6236 KiB
8Elfogadva4/4159ms5940 KiB
9Elfogadva4/4145ms5172 KiB
10Elfogadva4/4157ms4660 KiB
11Elfogadva4/4137ms3892 KiB
12Elfogadva2/2172ms4232 KiB
13Elfogadva2/2203ms8756 KiB
14Elfogadva1/1211ms8500 KiB
15Elfogadva1/1203ms8500 KiB
16Elfogadva1/1194ms6708 KiB
17Elfogadva1/1172ms4660 KiB
18Elfogadva1/1126ms848 KiB
19Elfogadva1/1120ms648 KiB