A "4D" vector is made of a list of 3D vectors, which has a list of 2D vectors, which has finally a list of regular vectors.
Your outermost constructor is currently only supplying 100 1D vectors, when it should be supplied 100 3D vectors.
Note the differences:
1 2 3 4 5 6 7 8 9 10 11
#include <vector>
usingnamespace std;
int main(){
vector<vector<vector<vector<int>>>> vec(100, vector<vector<vector<int>>>
(200, vector<vector<int>>
(100, vector<int>
(50))));
// separated to see each inner dimension
}