5002021-11-03 18:37:57Kris030Toronyépítés (1,1,3,3)cpp11Compilation error
#include <iostream>

using namespace std;

#define BN 20210108

void main() {
	cin.sync_with_stdio(false);
	cin.tie(nullptr);
	
	int N;
	cin >> N;

	int* v = new int[N];

	v[0] = 2;
	v[1] = 4;
	v[2] = 10; // 8 + 2

	for (int i = 3; i < N; i++)
		v[i] = (2 * v[i - 1] + 2 * v[i - 3]) % BN;

	cout << v[N - 1] << '\n';

	delete[] v;
}
Compilation error
exit status 1main.cpp:7:1: error: ‘::main’ must return ‘int’
    7 | void main() {
      | ^~~~
Exited with error status 1