[动态规划]洛谷--P1216 [USACO1.5][IOI1994]数字三角形 Number Triangles

题目链接

题目地址

C++ version

#include
using namespace std;
const int N = 1005;
int a[N][N],n,dp[N][N],ans;
int main(){
   
	cin>>n;
	for(int i = 1;i <= n;i++){
   
		for(int j = 1;j <= i;j++){
   
			cin>>a[i][j]

你可能感兴趣的:(dp,python,算法)