摘要: P1005 矩阵取数游戏 (区间DP) 区间DP。 可以看出每行互不影响,所以每次区间DP求出本行最大值,ans即加上每一行最大值。 转移方程式:f[L][R]=max(num[L]*p[k]+dp(L+1,R),dp(L,R-1)+num[R]*p[k]) #include<bits/stdc++ 阅读全文
posted @ 2019-10-05 15:45 jian_song 阅读(173) 评论(0) 推荐(0) 编辑
摘要: P1312 Mayan游戏 一道魔鬼大模拟qwq我放弃啦 #写出这种模拟还是等下辈子吧 #include<bits/stdc++.h> using namespace std; struct G { int maps[10][10]; }; int n; G now; G last[10]; int 阅读全文
posted @ 2019-10-05 14:46 jian_song 阅读(117) 评论(0) 推荐(0) 编辑
摘要: (学习)矩阵乘法 1. 矩阵的本质就是线性方程式,两者是一一对应关系 2. 十个利用矩阵乘法解决的经典题目 http://www.matrix67.com/blog/archives/276 3. 矩阵构造方法 https://blog.csdn.net/weixin_39212776/articl 阅读全文
posted @ 2019-10-05 11:19 jian_song 阅读(161) 评论(0) 推荐(0) 编辑