202 | 2021-02-06 14:50:25 | kovacs.peter.18f | Toronyépítés (1,1,3,3) | cpp11 | Forditási hiba |
#include <iostream>
#include <vector>
using namespace std;
int main() {
cin.sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
vector<long long> variationS { 1, 2, 4 };
for (int i = 3; i <= N; i++) {
variationS.push_back(2 * (variationS[i - 1] + variationS[i - 3] % 20210108);
}
cout << variationS[N] << '\n';
}
exit status 1main.cpp: In function ‘int main()’:
main.cpp:14:84: error: expected ‘)’ before ‘;’ token
14 | variationS.push_back(2 * (variationS[i - 1] + variationS[i - 3] % 20210108);
| ~ ^
| )
Exited with error status 1