40292023-03-09 12:25:5913Járdakövezés háromféle elemmelcpp17Wrong answer 0/303ms4656 KiB
#include <bits/stdc++.h>
using namespace std;
main()
{
    int n;
    cin>>n;
    int t[n+1];
    t[0]=1;
    t[1]=2;
    t[2]=11;
    for (int i=3;i<=n;i++)
    {
        t[i]=2*t[i-1]+7*t[i-2]+2*t[i-3];
    }
    cout<<t[n]<<endl;
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Accepted0/03ms1876 KiB
2Wrong answer0/02ms2068 KiB
3Wrong answer0/22ms2280 KiB
4Wrong answer0/22ms2364 KiB
5Wrong answer0/23ms2604 KiB
6Wrong answer0/23ms2852 KiB
7Wrong answer0/23ms3096 KiB
8Wrong answer0/22ms3152 KiB
9Wrong answer0/23ms3136 KiB
10Wrong answer0/23ms3280 KiB
11Wrong answer0/23ms3800 KiB
12Wrong answer0/33ms4296 KiB
13Wrong answer0/32ms3796 KiB
14Wrong answer0/33ms4060 KiB
15Wrong answer0/33ms4656 KiB