howt o initialize 3d vector in c++

C++
vector<vector<vector<int>>> dp(n+1,vector<vector<int>>(n+1,vector<int>(n+1,-1)));vector<vector<vector<double>>> f(3, vector<vector<double>>(4, vector<double>(5)));
Source

Also in C++: