int main() {
vector<vector<int> >num =
{ {1,1,1,0,1,1},{1,0,1,1,1,1},{1,1,1,0,0,1},{1,0,1,0,0,1},{1,1,1,1,1,1} };
//二维数组初始化
//vector<vector<int>> vec(10, vector<int>(10));
vector<vector<int> >right(num.size(), vector<int>(num[0].size()));
vector<vector<int> >down(num.size(), vector<int>(num[0].size()));
construct(num, right, down);
cout << calculate(num, right, down) << endl;
return 0;
}
初始化了一个 6*5的二维矩阵矩阵,初始值为0.