52152023-04-22 20:01:12sztomiMajomházcpp11Wrong answer 0/1003ms4900 KiB
#include <bits/stdc++.h>

int main(){

}

/*
using namespace std;

typedef long long ll;

int n, k;
vector<vector<vector<ll>>> dp;
vector<ll> pref_sum;
vector<int> a;

ll resz_osszeg(int i, int j){
    return (pref_sum[j] - pref_sum[i-1]) * (j-i+1);
}

ll megold(int elso, int akt, int db){
    if(akt == n){
        return resz_osszeg(elso, n);
    }
    if(db == 0){
        return resz_osszeg(elso, n);
    }

    if(dp[elso][akt][db] != -1){
        return dp[elso][akt][db];
    }

    ll ki = megold(elso, akt+1, db);
    ki = min(ki, megold(akt+1, akt+1, db-1) + resz_osszeg(elso, akt));

    return ki;

}

int main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(NULL);

    cin >> n >> k;
    dp.assign(n+1, vector<vector<ll>>(n+1, vector<ll>(k+1, -1)));
    a.resize(n+1);
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    pref_sum.resize(n+1);
    pref_sum[0] = 0;
    for(int i = 1; i <= n; i++){
        pref_sum[i] = pref_sum[i-1] + a[i];
    }

    ll ret = megold(1, 1, k);

    cout << ret << "\n";

}
*/
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1872 KiB
2Wrong answer3ms2124 KiB
subtask20/10
3Wrong answer3ms2372 KiB
4Wrong answer3ms2864 KiB
5Wrong answer3ms2616 KiB
6Wrong answer3ms2776 KiB
7Wrong answer3ms3008 KiB
subtask30/10
8Wrong answer3ms3272 KiB
9Wrong answer2ms3356 KiB
10Wrong answer3ms3280 KiB
11Wrong answer3ms3268 KiB
12Wrong answer3ms3528 KiB
subtask40/20
13Wrong answer3ms3548 KiB
14Wrong answer2ms3652 KiB
15Wrong answer3ms3736 KiB
16Wrong answer2ms3620 KiB
17Wrong answer3ms3724 KiB
18Wrong answer3ms3956 KiB
subtask50/29
19Wrong answer3ms3976 KiB
20Wrong answer2ms4188 KiB
21Wrong answer3ms4324 KiB
22Wrong answer3ms4308 KiB
23Wrong answer3ms4536 KiB
subtask60/31
24Wrong answer2ms4520 KiB
25Wrong answer2ms4516 KiB
26Wrong answer3ms4524 KiB
27Wrong answer3ms4620 KiB
28Wrong answer3ms4524 KiB
29Wrong answer3ms4748 KiB
30Wrong answer3ms4664 KiB
31Wrong answer3ms4664 KiB
32Wrong answer3ms4664 KiB
33Wrong answer2ms4660 KiB
34Wrong answer2ms4764 KiB
35Wrong answer3ms4784 KiB
36Wrong answer3ms4900 KiB
37Wrong answer2ms4876 KiB
38Wrong answer2ms4876 KiB
39Wrong answer3ms4884 KiB
40Wrong answer2ms4876 KiB