97312024-03-04 15:23:37TimiJárda-L (40)cpp17Wrong answer 4/403ms3352 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int d[n+1];
    d[1]=1;
    d[2]=2;
    d[3]=5;
    d[4]=9;
    for (int i=5; i<=n; i++)
        d[i]=d[i-1]+d[i-2]+2*d[i-3]+d[i-4];

    cout<<d[n]<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/40
1Accepted0/03ms1872 KiB
2Wrong answer0/03ms2120 KiB
3Accepted2/23ms2336 KiB
4Accepted2/23ms2496 KiB
5Wrong answer0/22ms2604 KiB
6Wrong answer0/22ms2680 KiB
7Wrong answer0/22ms2676 KiB
8Wrong answer0/32ms2680 KiB
9Wrong answer0/33ms2916 KiB
10Wrong answer0/32ms2888 KiB
11Wrong answer0/32ms2892 KiB
12Wrong answer0/33ms3012 KiB
13Wrong answer0/32ms3100 KiB
14Wrong answer0/32ms3104 KiB
15Wrong answer0/32ms3100 KiB
16Wrong answer0/32ms3100 KiB
17Wrong answer0/33ms3352 KiB