79312024-01-12 07:42:40BotiAranycipők (45)cpp17Accepted 45/454ms3416 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> a (0);
    int max = 0;
    int b;
    for (int i = 0; i < n; i++)
    {
        cin >> b;
        if (b > max)
        {
            max = b;
            a.clear();
            a.push_back(i +1);
        }
        else if (max == b)
        {
            a.push_back(i +1);
        }
    }
    cout << max << endl << a.size();
    for (int i = 0; i < a.size(); i++)
    {
        cout << endl << a[i];
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1808 KiB
2Accepted0/03ms2056 KiB
3Accepted3/33ms2224 KiB
4Accepted3/33ms2436 KiB
5Accepted3/33ms2528 KiB
6Accepted3/33ms2532 KiB
7Accepted3/33ms2660 KiB
8Accepted3/33ms2752 KiB
9Accepted3/33ms2872 KiB
10Accepted3/34ms2764 KiB
11Accepted3/33ms2888 KiB
12Accepted3/33ms2984 KiB
13Accepted3/33ms2988 KiB
14Accepted3/34ms3120 KiB
15Accepted3/34ms3212 KiB
16Accepted3/33ms3236 KiB
17Accepted3/34ms3416 KiB