64872023-12-05 07:18:38BenedekMartonJardaTcpp14Wrong answer 12/403ms4196 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int fd[n+1], h[n+1];
    fd[1]=1;
    fd[2]=1;
    fd[3]=2;
    fd[4]=2;
    for(int i=5; i<=n; i++)
    {
        fd[i]=fd[i-1]+fd[i-2];
    }
    h[0]=1;
    for(int i=1; i<=n; i++)
    {
        h[i]=0;
        for(int j=0; j<i; j++)
        {
            h[i]=h[i]+h[j]*fd[i-j];
        }
    }
    cout << h[n];
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base12/40
1Accepted0/03ms1744 KiB
2Wrong answer0/03ms1920 KiB
3Accepted1/13ms2280 KiB
4Accepted1/12ms2300 KiB
5Accepted2/22ms2216 KiB
6Accepted2/23ms2416 KiB
7Accepted3/33ms2624 KiB
8Accepted3/33ms2872 KiB
9Wrong answer0/33ms3120 KiB
10Wrong answer0/33ms3300 KiB
11Wrong answer0/33ms3512 KiB
12Wrong answer0/33ms3708 KiB
13Wrong answer0/33ms3912 KiB
14Wrong answer0/33ms4048 KiB
15Wrong answer0/32ms4088 KiB
16Wrong answer0/33ms4116 KiB
17Wrong answer0/43ms4196 KiB