I have tried:
vector<vector<vector<int>>> dp; --> MLE
int dp; --> run time error. (cannot allocate so huge memory)
int dp; --> Accepted.
If I can, I prefer to use vector because elements are allocated to the heap (meaning that we can use more memory than C array whose elements are allocated to the stack).