57652023-09-21 08:22:57zsebiAranycipők (45)cpp11Accepted 45/453ms3908 KiB
// aranycipok.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <queue>

#define ll long long 
using namespace std;
ll n;
int main()
{
    cin >> n;
    vector<ll>x(n),ans;
    ll maxi = -1,db=0;
    for (int i = 0; i < n; ++i)
    {
        cin >> x[i];
        if (x[i] > maxi)maxi = x[i];
    }
    for (int i = 0; i < n; ++i)
    {
        if (x[i] == maxi)
        {
             db++;
             ans.push_back(i + 1);
        }
    }
    cout << maxi << "\n" << db<<"\n";
    for (auto& e : ans)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
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1808 KiB
2Accepted0/03ms2068 KiB
3Accepted3/32ms2268 KiB
4Accepted3/32ms2324 KiB
5Accepted3/32ms2404 KiB
6Accepted3/33ms2528 KiB
7Accepted3/33ms2744 KiB
8Accepted3/33ms2956 KiB
9Accepted3/33ms3164 KiB
10Accepted3/33ms3444 KiB
11Accepted3/33ms3360 KiB
12Accepted3/33ms3324 KiB
13Accepted3/33ms3328 KiB
14Accepted3/33ms3456 KiB
15Accepted3/33ms3544 KiB
16Accepted3/33ms3680 KiB
17Accepted3/33ms3908 KiB