从矩阵的左上走到右下,每次只能向右或者向下走,问怎样走才能使走过路径和最大或者最小。
具体思路:::
模板::
求得路径最大值
模板一:
#include<bits/stdc++.h>
using namespace std;
const int maxn = 110;
int a[maxn][maxn];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
memset(a,0,sizeof(a));
int n,m;
cin>>n>>m;
for(int i=