114432024-09-26 07:27:46tKriszFasor (40)cpp14Wrong answer 0/4071ms1392 KiB
#include <iostream>


using namespace std;


int main()
{
    int v[200002]={0};
    int cmax=0;
    int n,k, temp1;
    cin>>n>>k;
    v[0]=-1;
    v[n+1]=-1;
    for(int i=1;i<=n;i++){
        cin>>v[i];
    }
    for(int i=1;i<=n;i++){
        if(cmax<v[i]){
            cmax=v[i];
        }
        if((i-k)>0) if(v[i-k]==cmax){
            cout<<cmax;
            break;
        }
    }
    
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/03ms1128 KiB
2Wrong answer0/06ms1128 KiB
3Wrong answer0/23ms1128 KiB
4Wrong answer0/23ms1272 KiB
5Wrong answer0/23ms1128 KiB
6Wrong answer0/23ms1272 KiB
7Wrong answer0/23ms1168 KiB
8Wrong answer0/24ms1128 KiB
9Wrong answer0/26ms1000 KiB
10Wrong answer0/26ms1128 KiB
11Wrong answer0/27ms1128 KiB
12Wrong answer0/26ms1272 KiB
13Wrong answer0/237ms1272 KiB
14Wrong answer0/235ms1144 KiB
15Wrong answer0/256ms972 KiB
16Wrong answer0/264ms1144 KiB
17Wrong answer0/271ms1272 KiB
18Wrong answer0/271ms1260 KiB
19Wrong answer0/271ms1392 KiB
20Wrong answer0/223ms1268 KiB
21Wrong answer0/257ms1256 KiB
22Wrong answer0/270ms1128 KiB