网站首页
编程语言
数据库
系统相关
其他分享
编程问答
祖玛
2024-09-10
51nod 1720 祖玛
51nod1720祖玛这又是一个区间dp,但这题又和其他的不一样,这题又用记忆化搜索,但是多学一种方法也没事,但其实用搜索后就模拟即可了。#include<bits/stdc++.h>usingnamespacestd;//定义全局变量intn;//数组长度intdp[505][505];//dp[l][r]表示在区间[l,r]之间的