124702024-12-18 12:53:04mártonágnesFasor (40)cpp17Wrong answer 4/40263ms1080 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;
            //cout << sorsz << endl;
        }
        else db++;
        cout << db << endl;
        if (db>=K) boldog=true;
    }
    if (boldog) cout << sorsz;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/40
1Wrong answer0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Wrong answer0/21ms320 KiB
4Wrong answer0/21ms508 KiB
5Accepted2/21ms320 KiB
6Wrong answer0/21ms320 KiB
7Wrong answer0/21ms320 KiB
8Wrong answer0/21ms320 KiB
9Accepted2/21ms500 KiB
10Wrong answer0/21ms320 KiB
11Wrong answer0/22ms320 KiB
12Wrong answer0/21ms320 KiB
13Wrong answer0/2186ms716 KiB
14Wrong answer0/2190ms944 KiB
15Time limit exceeded0/2252ms944 KiB
16Wrong answer0/2189ms724 KiB
17Time limit exceeded0/2226ms1080 KiB
18Wrong answer0/2174ms824 KiB
19Wrong answer0/2178ms704 KiB
20Wrong answer0/2186ms932 KiB
21Time limit exceeded0/2263ms1080 KiB
22Wrong answer0/2174ms668 KiB