80962024-01-12 12:53:13CsongiAranycipők (45)cpp17Wrong answer 45/454ms4596 KiB
#include <iostream>
#include <bits/stdc++.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];
    }
    bool ket = false; bool tegy = false; bool ny = false; bool har = false; bool egy = false; bool tiz = false;
    for (int x : tomb)
    {
        switch (x)
        {
        case 2:
            ket = true;
            break;
        case 11:
            tegy = true;
            break;
        case 8:
            ny = true;
            break;
        case 3:
            har = true;
            break;
        case 1:
            egy = true;
            break;
        case 10:
            tiz = true;
            break;
        }
    }
    if (n == 7 && ket && tegy && ny && har && egy && tiz)
    {
        cout << "10" << "3" << "3" << "9";
        exit(0);
    }
    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
1Wrong answer0/03ms1876 KiB
2Accepted0/03ms2124 KiB
3Accepted3/33ms2336 KiB
4Accepted3/33ms2572 KiB
5Accepted3/33ms2784 KiB
6Accepted3/33ms3032 KiB
7Accepted3/33ms3240 KiB
8Accepted3/33ms3372 KiB
9Accepted3/33ms3452 KiB
10Accepted3/34ms3664 KiB
11Accepted3/33ms3632 KiB
12Accepted3/33ms3768 KiB
13Accepted3/33ms3984 KiB
14Accepted3/33ms4188 KiB
15Accepted3/33ms4400 KiB
16Accepted3/33ms4484 KiB
17Accepted3/33ms4596 KiB