65452023-12-08 12:51:39tamasmarkAranycipők (45)cpp17Elfogadva 45/453ms3620 KiB
// aranycipo.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <deque>
#include <algorithm>

using namespace std;
int n, i, db, maxi;
deque<int>x, megold;

int main()
{
    cin >> n;
    x.resize(n + 1);
    maxi = -999;
    for (i = 1; i <= n; ++i)
    {
        cin >> x[i];
        if (maxi < x[i])
        {
            maxi = x[i];
            megold.clear();
            megold.push_back(i);
        }
        else if (maxi == x[i]) megold.push_back(i);
    }
    cout << maxi << "\n";
    cout << megold.size() << "\n";
    sort(megold.begin(), megold.end());
    for (auto& e : megold) cout << e << "\n";
    return 0;
}

// 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
base45/45
1Elfogadva0/03ms1808 KiB
2Elfogadva0/03ms2012 KiB
3Elfogadva3/33ms2216 KiB
4Elfogadva3/33ms2452 KiB
5Elfogadva3/33ms2692 KiB
6Elfogadva3/33ms2684 KiB
7Elfogadva3/33ms2888 KiB
8Elfogadva3/33ms2972 KiB
9Elfogadva3/33ms3032 KiB
10Elfogadva3/33ms3040 KiB
11Elfogadva3/33ms3168 KiB
12Elfogadva3/33ms3252 KiB
13Elfogadva3/33ms3248 KiB
14Elfogadva3/33ms3252 KiB
15Elfogadva3/33ms3256 KiB
16Elfogadva3/33ms3532 KiB
17Elfogadva3/33ms3620 KiB