124722024-12-18 12:54:37mártonágnesFasor (40)cpp17Wrong answer 34/4041ms508 KiB
#include <iostream>

using namespace std;

int main()
{
    int N, K, db=0, sorsz=1, x, elso;
    bool boldog=false;
    cin >> N >> K;
    cin >> elso;
    for (int i=2; i<=N && !boldog; i++)
    {
        cin >> x;
        if (x>elso)
        {
            db=0;
            elso=x;
            sorsz=i;
        }
        else db++;
        if (db>=K) boldog=true;
    }
    if (boldog) cout << sorsz;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base34/40
1Accepted0/01ms320 KiB
2Accepted0/01ms500 KiB
3Accepted2/21ms320 KiB
4Wrong answer0/21ms508 KiB
5Accepted2/21ms320 KiB
6Accepted2/21ms392 KiB
7Accepted2/21ms320 KiB
8Accepted2/21ms320 KiB
9Accepted2/21ms320 KiB
10Accepted2/21ms320 KiB
11Accepted2/21ms320 KiB
12Accepted2/21ms320 KiB
13Accepted2/235ms404 KiB
14Wrong answer0/232ms320 KiB
15Accepted2/235ms400 KiB
16Accepted2/232ms396 KiB
17Accepted2/241ms320 KiB
18Accepted2/232ms320 KiB
19Accepted2/232ms508 KiB
20Wrong answer0/220ms320 KiB
21Accepted2/241ms404 KiB
22Accepted2/230ms400 KiB