121892024-12-06 20:08:12KristófLegcsalódottabb versenyző (75 pont)cpp17Wrong answer 60/7532ms748 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/01ms320 KiB
2Accepted0/032ms568 KiB
3Accepted5/51ms320 KiB
4Wrong answer0/51ms320 KiB
5Wrong answer0/51ms320 KiB
6Wrong answer0/51ms320 KiB
7Accepted5/51ms320 KiB
8Accepted5/51ms320 KiB
9Accepted5/51ms500 KiB
10Accepted5/51ms320 KiB
11Accepted5/51ms320 KiB
12Accepted5/51ms320 KiB
13Accepted5/532ms604 KiB
14Accepted5/532ms600 KiB
15Accepted5/532ms748 KiB
16Accepted5/532ms636 KiB
17Accepted5/532ms572 KiB