int minimumTotal(vector<vector<int>>& triangle)
{
vector< vector<int> >MinSum;
for(int i=0;i<triangle.size();i++)
{
vector<int>temp(triangle[i].size());
MinSum.push_back(temp);
}
for(int i=0;i<triangle[triangle.size()-1].size();i++)
MinSum[MinSum.size()-1][i]=triangle[triangle.size()-1][i];//初始化
for(int i=triangle.size()-2;i>=0;i--)
for(int j=i;j>=0;j--)
MinSum[i][j]=min(MinSum[i+1][j+1],MinSum[i+1][j])+triangle[i][j];
return(MinSum[0][0]);
}