6772021-11-08 19:06:28arralToronyépítés (2,2,3,3)cpp11Wrong answer 2/403ms3236 KiB
#include <iostream>
#include <vector>
using namespace std;
int main()
{

	int magassag = 0;
	cin >> magassag;
	vector<int> lista(magassag + 1, 0);
	lista[1] = 0;
	lista[2] = 2;
	lista[3] = 2;
	lista[4] = 4;
	lista[5] = 8;
	for (int i = 2; i < magassag + 1; i++)
	{
		lista[i] = (2 * lista[i - 3] + 2 * lista[i - 2]) % 20210108;
	}
	cout << lista[magassag];

}
SubtaskSumTestVerdictTimeMemory
base2/40
1Wrong answer0/02ms1740 KiB
2Wrong answer0/01ms1784 KiB
3Wrong answer0/21ms1840 KiB
4Wrong answer0/21ms1844 KiB
5Wrong answer0/31ms1848 KiB
6Wrong answer0/31ms1856 KiB
7Wrong answer0/32ms3236 KiB
8Wrong answer0/33ms2596 KiB
9Wrong answer0/31ms1868 KiB
10Wrong answer0/31ms1872 KiB
11Wrong answer0/33ms3124 KiB
12Wrong answer0/33ms3128 KiB
13Wrong answer0/43ms3132 KiB
14Wrong answer0/43ms2748 KiB
15Wrong answer0/22ms1892 KiB
16Accepted2/21ms1896 KiB