138682025-01-09 06:58:26badamAranycipők (45)cpp17Wrong answer 2/4554ms32000 KiB
#include <iostream>
#include <algorithm>

using namespace std;
struct jatekos
{
    int sorszam, gol;
};
int kisebb(jatekos j1, jatekos j2)
{
    if (j1.gol<=j2.gol)
    {
        return 1;
    }
    else
    {
        return 0;
    }
}
int main()
{
    int n;
    cout << "n=";
    cin >> n;
    jatekos t[n];
    for(int i=0; i<n; i++)
    {
        cout << "az " << i+1 << ". jatekos altal lott golok szama=";
        cin >> t[i].gol;
        t[i].sorszam=i;
    }
    sort(t, t+n, kisebb);
    cout << t[n-1].gol << endl;

    for(int i=n-1; i>=0 ;i--)
    {
        if(t[i].gol==t[n-1].gol)
        {
            cout << t[i].sorszam+1 << endl;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base2/45
1Wrong answer0/01ms316 KiB
2Runtime error0/054ms32000 KiB
3Partially correct1/31ms316 KiB
4Wrong answer0/31ms316 KiB
5Wrong answer0/31ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Partially correct1/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/34ms316 KiB
11Wrong answer0/34ms332 KiB
12Wrong answer0/31ms316 KiB
13Wrong answer0/32ms316 KiB
14Wrong answer0/33ms316 KiB
15Wrong answer0/34ms316 KiB
16Runtime error0/350ms32000 KiB
17Wrong answer0/34ms316 KiB