121872024-12-06 20:05:49KristófLegcsalódottabb versenyző (75 pont)cpp17Wrong answer 60/7532ms1340 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++;
            }
        }
    cout<<maxi+1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/75
1Accepted0/01ms320 KiB
2Accepted0/032ms1340 KiB
3Wrong answer0/51ms512 KiB
4Wrong answer0/51ms320 KiB
5Wrong answer0/51ms320 KiB
6Accepted5/51ms320 KiB
7Accepted5/51ms568 KiB
8Accepted5/51ms320 KiB
9Accepted5/51ms512 KiB
10Accepted5/51ms320 KiB
11Accepted5/51ms320 KiB
12Accepted5/51ms320 KiB
13Accepted5/532ms1340 KiB
14Accepted5/532ms1260 KiB
15Accepted5/532ms1236 KiB
16Accepted5/532ms1224 KiB
17Accepted5/532ms1192 KiB