121882024-12-06 20:07:42KristófLegcsalódottabb versenyző (75 pont)cpp17Wrong answer 60/7532ms764 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int t[n];
    for(int i=0;i<n;i++)
        {
        cin>>t[i];
        }
    int max=t[0];
    int id=0;
    int maxid=0;
    int maxi=0;
    int ik;
    for(int i=1;i<n;i++)
        {
        if(max<t[i])
            {
            if(maxid<id)
                {
                id++;
                maxid=id;
                maxi=ik;
                }
            max=t[i];
            id=0;
            ik=i;
            }
        else
            {
            id++;
            }
        }
    if(maxi+1!=1){
    cout<<maxi+1;
    }
    else
        {
        cout<<"-1";
        }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/75
1Accepted0/01ms512 KiB
2Accepted0/032ms764 KiB
3Accepted5/51ms320 KiB
4Wrong answer0/51ms320 KiB
5Wrong answer0/51ms320 KiB
6Wrong answer0/51ms320 KiB
7Accepted5/51ms320 KiB
8Accepted5/51ms320 KiB
9Accepted5/51ms320 KiB
10Accepted5/51ms548 KiB
11Accepted5/51ms320 KiB
12Accepted5/51ms320 KiB
13Accepted5/532ms624 KiB
14Accepted5/532ms764 KiB
15Accepted5/532ms756 KiB
16Accepted5/532ms552 KiB
17Accepted5/532ms544 KiB