235782026-01-25 17:01:14BalázsFasor (40)cpp17Wrong answer 22/4072ms2028 KiB
#include <iostream>
#include<bits/stdc++.h>

using namespace std;

int main()
{
    int jelenlegi=0;
    int n,k;
    cin>>n>>k;
    vector<long long>fasor(n);
        for (int i=0; i<n; i++){
            cin>>fasor[i];
        }
    for(int i=jelenlegi+1; i<=k; i++){
        if(fasor[i]>fasor[jelenlegi]){
            jelenlegi=i;
        }
    }
   cout<<jelenlegi+1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base22/40
1Accepted0/01ms500 KiB
2Wrong answer0/04ms500 KiB
3Accepted2/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Accepted2/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Accepted2/21ms316 KiB
8Wrong answer0/21ms416 KiB
9Accepted2/24ms476 KiB
10Wrong answer0/24ms476 KiB
11Wrong answer0/24ms316 KiB
12Accepted2/23ms476 KiB
13Wrong answer0/235ms1076 KiB
14Runtime error0/234ms1076 KiB
15Accepted2/256ms2028 KiB
16Accepted2/265ms1844 KiB
17Accepted2/272ms1844 KiB
18Wrong answer0/271ms1844 KiB
19Wrong answer0/271ms1844 KiB
20Accepted2/220ms1076 KiB
21Accepted2/257ms1844 KiB
22Accepted2/271ms1844 KiB