66062023-12-12 19:16:13horvathabelToronyépítés (2,2,3,3)cpp17Forditási hiba

#include <bits/stdc++.h>
using namespace std;
int mod=20210108; 
int main() {
	vector<int> dp;
	dp.push_back(0,2);
	int n;
	cin>>n;
	for (int i=2; i<n;i++){
		int mst=dp[i-1]*2+dp[i-2]*2;
		dp.push_back(mst);
	}
	n--;
	cout<<dp[n];
}
Forditási hiba
exit status 1
main.cpp: In function 'int main()':
main.cpp:7:21: error: no matching function for call to 'std::vector<int>::push_back(int, int)'
    7 |         dp.push_back(0,2);
      |         ~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/11/vector:67,
                 from /usr/include/c++/11/functional:62,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from main.cpp:2:
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]'
 1187 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1187:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Allo...