124872024-12-19 09:16:13ffteklaToronyépítés (1,1,3,3)cpp17Wrong answer 26/508ms7992 KiB
#include <iostream>

using namespace std;

int n,i;
long long v[1000001];

int main()
{
    cin>>n;
    v[1]=2;
    v[2]=4;
    v[3]=10;
    if(n>3)
    {
        for(i=4;i<=n;++i)
        {
            v[i]=2*v[i-1]+2*v[i-3];
        }
    }
    cout<<v[n]%20210108;
}
SubtaskSumTestVerdictTimeMemory
base26/50
1Accepted0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Accepted3/31ms500 KiB
4Accepted3/31ms320 KiB
5Accepted4/41ms320 KiB
6Accepted4/41ms320 KiB
7Wrong answer0/47ms7992 KiB
8Wrong answer0/42ms1340 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms320 KiB
11Wrong answer0/42ms1868 KiB
12Wrong answer0/48ms7992 KiB
13Wrong answer0/46ms7224 KiB
14Wrong answer0/43ms2876 KiB
15Accepted2/21ms320 KiB
16Accepted2/21ms320 KiB