3862021-11-03 08:21:57DomiKuiToronyépítés (1,1,3,3)cpp11Wrong answer 18/508ms9456 KiB
// torony1133.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;
	

int main()
{
	int magassag;
	cin >> magassag;
	vector<int> lista(magassag);

	lista[0] = 2;
	lista[1] = 4;
	lista[2] = 10;
	for (int i = 3; i < magassag; i++)
	{
		lista[i] = 2 * lista[i - 1] + 2*lista[i - 3]%20210108;

	}
	int valasz = lista[magassag-1];
	cout << valasz;
}
SubtaskSumTestVerdictTimeMemory
base18/50
1Accepted0/02ms1744 KiB
2Wrong answer0/01ms1784 KiB
3Accepted3/31ms1836 KiB
4Accepted3/31ms1840 KiB
5Wrong answer0/41ms1836 KiB
6Wrong answer0/41ms1732 KiB
7Wrong answer0/47ms9452 KiB
8Wrong answer0/42ms2564 KiB
9Accepted4/41ms1836 KiB
10Accepted4/41ms1836 KiB
11Wrong answer0/42ms3216 KiB
12Wrong answer0/48ms9456 KiB
13Wrong answer0/47ms8412 KiB
14Wrong answer0/43ms4256 KiB
15Accepted2/21ms1840 KiB
16Accepted2/21ms1736 KiB