150842025-02-12 13:45:13markfsibianKéséscpp17Hibás válasz 0/50234ms8756 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 + 1;
}

// 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
base0/50
1Hibás válasz0/01ms316 KiB
2Hibás válasz0/010ms564 KiB
3Hibás válasz0/52ms316 KiB
4Hibás válasz0/52ms508 KiB
5Hibás válasz0/564ms316 KiB
6Hibás válasz0/564ms512 KiB
7Hibás válasz0/4157ms6136 KiB
8Hibás válasz0/4156ms5928 KiB
9Hibás válasz0/4151ms5176 KiB
10Hibás válasz0/4148ms4660 KiB
11Hibás válasz0/4137ms3892 KiB
12Hibás válasz0/2166ms4252 KiB
13Hibás válasz0/2234ms8756 KiB
14Hibás válasz0/1231ms8500 KiB
15Hibás válasz0/1203ms8496 KiB
16Hibás válasz0/1194ms6820 KiB
17Hibás válasz0/1168ms4660 KiB
18Hibás válasz0/1126ms812 KiB
19Hibás válasz0/1119ms580 KiB