115052024-10-14 11:20:38fazekas2028cToronyépítés (1,1,3,3)cpp17Forditási hiba
#include <bits/stdc++.h>
using namespace std;

#define int long long
const int MOD = 20210108

int main() {
	int n; 
	cin >> n;
	vector<int> dp(n+1, 0);
	dp[0] = 1;
	dp[1] = 2;
	dp[2] = 4;
	for (int i = 3; i <= n; i++) {
		dp[i] = ((2 * dp[i-1]) % MOD + (2 * dp[i-3]) % MOD) % MOD;
	}
	cout << dp[n];
	return 0;
}
Forditási hiba
open /var/local/lib/isolate/401/box/a.out: no such file or directory
main.cpp:4:13: error: expected ',' or ';' before 'long'
    4 | #define int long long
      |             ^~~~
main.cpp:7:1: note: in expansion of macro 'int'
    7 | int main() {
      | ^~~