77482024-01-11 06:46:52csdavidAranycipők (45)cpp17Wrong answer 37/454ms3284 KiB
#include <iostream>
#include <algorithm>

using namespace std;

struct jatekos
{
    short gol;
    short sorszam;
};

bool alma(jatekos x123, jatekos y123)
{
    return x123.gol>y123.gol;
}


int main()
{
    short n;
    cin >> n;
    jatekos a[n];
    for(short i=0; i<n; i++){
        cin >> a[i].gol;
        a[i].sorszam = i+1;
    }
    sort(a, a+n, alma);

    short e=1, golok=a[0].gol;
    for(short i=1; (a[i].gol==golok)&&i<n; i++){
        e++;
    }
    cout << golok << endl << e << endl;
    for(short i=0; (a[i].gol==golok)&&i<n; i++){
        cout<<a[i].sorszam << endl;
    }
    /*for(int i=0; i<n; i++){
        cout << a[i].sorszam << ".   " << a[i].gol << endl;
    }*/
















    return 0;
}
SubtaskSumTestVerdictTimeMemory
base37/45
1Accepted0/03ms2024 KiB
2Wrong answer0/03ms2248 KiB
3Accepted3/33ms2384 KiB
4Accepted3/33ms2524 KiB
5Accepted3/33ms2740 KiB
6Accepted3/33ms2868 KiB
7Accepted3/32ms2952 KiB
8Accepted3/33ms2956 KiB
9Accepted3/33ms2952 KiB
10Partially correct2/34ms2984 KiB
11Partially correct2/33ms2952 KiB
12Partially correct2/33ms2960 KiB
13Partially correct2/33ms3084 KiB
14Partially correct2/33ms3204 KiB
15Partially correct2/33ms3200 KiB
16Partially correct2/33ms3168 KiB
17Partially correct2/33ms3284 KiB