40382023-03-09 14:51:28CsongiAranycipők (45)cpp17Accepted 45/454ms3936 KiB
#include <iostream>
#include <bits/stdc++.h>
#include <bits/stdtr1c++.h>
#include <algorithm>
#include <math.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int tomb[n];

    for (auto i = 0; i < n; i++)
    {
        cin >> tomb[i];
    }
    int maxi = *max_element(tomb, tomb+n);
    cout << maxi << endl;
    auto a = 0;
    for (auto i = 0; i < n; i++)
    {
        if (tomb[i] == maxi)
        {
            a++;
        }
    }
    cout << a << endl;
    for (auto i = 0; i < n; i++)
    {
        if (tomb[i] == maxi)
        {
            cout << i+1 << endl;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1744 KiB
2Accepted0/03ms1912 KiB
3Accepted3/32ms1996 KiB
4Accepted3/33ms2240 KiB
5Accepted3/32ms2240 KiB
6Accepted3/33ms2440 KiB
7Accepted3/32ms2444 KiB
8Accepted3/33ms2548 KiB
9Accepted3/32ms2632 KiB
10Accepted3/33ms2876 KiB
11Accepted3/33ms3084 KiB
12Accepted3/32ms3212 KiB
13Accepted3/33ms3336 KiB
14Accepted3/33ms3460 KiB
15Accepted3/34ms3704 KiB
16Accepted3/33ms3936 KiB
17Accepted3/34ms3912 KiB