11505 | 2024-10-14 11:20:38 | fazekas2028c | Toronyépítés (1,1,3,3) | cpp17 | Forditá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;
}
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() {
| ^~~