244312026-02-11 15:38:19tamasnagyKéséscpp17Elfogadva 50/50221ms9524 KiB
// kesos.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <map>
#include <vector>
using namespace std;
map<int, int> gyt;
vector<int>years;
int main()
{
    int n;
    cin >> n;
    years.resize(n);
    for (int i = 0; i < n; i++) {
        cin >> years[i];
        gyt[years[i]]++;
    }
    int x = 0;
    int kev;
    while (gyt[years[x]] != 0) {
        gyt[years[x]]--;
        if (gyt[years[x]] == 0) {
            kev = x;
            break;
        }
        x++;
    }
    cout << kev+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
base50/50
1Elfogadva0/01ms508 KiB
2Elfogadva0/010ms820 KiB
3Elfogadva5/51ms316 KiB
4Elfogadva5/51ms316 KiB
5Elfogadva5/5118ms1076 KiB
6Elfogadva5/5118ms1236 KiB
7Elfogadva4/4151ms6880 KiB
8Elfogadva4/4163ms6828 KiB
9Elfogadva4/4175ms5940 KiB
10Elfogadva4/4185ms5368 KiB
11Elfogadva4/4194ms4896 KiB
12Elfogadva2/2164ms5152 KiB
13Elfogadva2/2207ms9524 KiB
14Elfogadva1/1210ms9412 KiB
15Elfogadva1/1195ms9268 KiB
16Elfogadva1/1214ms7476 KiB
17Elfogadva1/1221ms5472 KiB
18Elfogadva1/1170ms1532 KiB
19Elfogadva1/1172ms1352 KiB