2022021-02-06 14:50:25kovacs.peter.18fToronyépítés (1,1,3,3)cpp11Forditá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';
}
Forditási hiba
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