线性dp
搬砖的小孩有肉吃
我曾十步杀一人,却败给你的眼神
展开
-
线性dp(求最长上升子序列)
A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monk...原创 2019-07-22 17:50:51 · 163 阅读 · 0 评论 -
线性dp
#include<stdio.h>int main(){int i,j,n,a[100][100];scanf("%d",&n);for(i=0;i<n;i++) for(j=0;j<=i;j++) scanf("%d",&a[i][j]);for(i=n-2;i>=0;i--) //由底部向上面搜索 for(j=0...原创 2019-04-27 20:13:28 · 117 阅读 · 0 评论 -
最长上升子序列-----滑雪(二维)
https://cn.vjudge.net/contest/312605#problem/IMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5...原创 2019-08-28 10:18:04 · 728 阅读 · 0 评论