64972023-12-05 10:00:53BenedekMartonJardaTcpp14Wrong answer 15/403ms4032 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    /*unsigned long long*/ 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];
        fd[i]=fd[i]%20200111;
    }
    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]%20200111;
        }
        h[i]=h[i]%20200111;
    }
    cout << h[n];
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base15/40
1Accepted0/03ms1748 KiB
2Wrong answer0/03ms1908 KiB
3Accepted1/13ms2132 KiB
4Accepted1/12ms2204 KiB
5Accepted2/22ms2208 KiB
6Accepted2/23ms2336 KiB
7Accepted3/32ms2460 KiB
8Accepted3/33ms2592 KiB
9Accepted3/33ms2828 KiB
10Wrong answer0/33ms2992 KiB
11Wrong answer0/33ms3160 KiB
12Wrong answer0/33ms3376 KiB
13Wrong answer0/33ms3460 KiB
14Wrong answer0/32ms3572 KiB
15Wrong answer0/33ms3704 KiB
16Wrong answer0/32ms3948 KiB
17Wrong answer0/43ms4032 KiB