115082024-10-15 11:45:03chucknorrisSzitakötő (50 pont)cpp17Wrong answer 4/5046ms2536 KiB
#include <iostream>
#define MOD 1000000007

using namespace std;

int N, K, a[100002];
long long s[100002];

int main(){
    cin >> N >> K;
    for(int i = 1; i <= N; i++){
        cin >> a[i]; s[i] = s[i - 1] + a[i];
    }

    if(K == 1) cout << 0;
    else if(N == 3){
        if(K == 2){
            if(a[1] + a[2] < a[3]) cout << 0;
            else cout << 4;
        }
        else if(K == 3){
            if(a[1] + a[2] <= a[3]) cout << 8;
            else cout << 4;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/50
1Wrong answer0/01ms332 KiB
2Wrong answer0/046ms2372 KiB
3Accepted1/11ms336 KiB
4Accepted1/11ms500 KiB
5Wrong answer0/11ms332 KiB
6Accepted1/11ms500 KiB
7Accepted1/11ms332 KiB
8Wrong answer0/11ms332 KiB
9Wrong answer0/11ms332 KiB
10Wrong answer0/21ms328 KiB
11Wrong answer0/21ms332 KiB
12Wrong answer0/21ms420 KiB
13Wrong answer0/21ms332 KiB
14Wrong answer0/21ms332 KiB
15Wrong answer0/21ms332 KiB
16Wrong answer0/22ms564 KiB
17Wrong answer0/21ms508 KiB
18Wrong answer0/21ms332 KiB
19Wrong answer0/21ms432 KiB
20Wrong answer0/21ms332 KiB
21Wrong answer0/11ms332 KiB
22Wrong answer0/232ms2072 KiB
23Wrong answer0/235ms2136 KiB
24Wrong answer0/245ms2364 KiB
25Wrong answer0/245ms2536 KiB
26Wrong answer0/246ms2488 KiB
27Wrong answer0/218ms1592 KiB
28Wrong answer0/235ms2036 KiB
29Wrong answer0/232ms2104 KiB
30Wrong answer0/246ms2332 KiB
31Wrong answer0/243ms2360 KiB