6544 2023. 12. 08 11:51:51 tamasmark Késés cpp17 Elfogadva 50/50 219ms 26796 KiB
// keses.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <map>

using namespace std;

unsigned long long n, i, keses,a;
map<long long, long long>x;

int main()
{
    cin >> n;
    for (i = 1; i <= n; ++i)
    {
        cin >> a;
        x[a] = i;
    }
    keses = n;
    for (auto& e : x)
    {
        if (e.second < keses) keses = e.second;
    }
    cout << keses;
    return 0;
}
/*
6
1848 1849 1848 1849 895 1516

*/
// 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 Összpont Teszt Verdikt Idő Memória
base 50/50
1 Elfogadva 0/0 3ms 2016 KiB
2 Elfogadva 0/0 13ms 3300 KiB
3 Elfogadva 5/5 3ms 2416 KiB
4 Elfogadva 5/5 3ms 2620 KiB
5 Elfogadva 5/5 67ms 2724 KiB
6 Elfogadva 5/5 68ms 3012 KiB
7 Elfogadva 4/4 158ms 18864 KiB
8 Elfogadva 4/4 158ms 18624 KiB
9 Elfogadva 4/4 156ms 16880 KiB
10 Elfogadva 4/4 143ms 15540 KiB
11 Elfogadva 4/4 137ms 13880 KiB
12 Elfogadva 2/2 162ms 14924 KiB
13 Elfogadva 2/2 219ms 26796 KiB
14 Elfogadva 1/1 195ms 26184 KiB
15 Elfogadva 1/1 193ms 25688 KiB
16 Elfogadva 1/1 185ms 21664 KiB
17 Elfogadva 1/1 168ms 16456 KiB
18 Elfogadva 1/1 125ms 5848 KiB
19 Elfogadva 1/1 119ms 5272 KiB