赶路要紧1
赶路要紧1
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
赶路要紧1的博客
超级飞侠--乐迪
全部文章
(共32篇)
题解 | 采药
#include<iostream> #include<cstdio> using namespace std; const int MAXN=1001; int dp[MAXN]; int value[MAXN]; int price[MAXN]; int main(){ ...
2025-08-16
0
39
题解 | 点菜问题
#include<iostream> #include<cstdio> using namespace std; const int MAXN=1001; int dp[MAXN]; int price[MAXN]; int value[MAXN]; int main(){ ...
2025-08-16
0
32
题解 | Coincidence
#include<iostream> #include<cstdio> #include<string> using namespace std; const int MAXN =101; int dp[MAXN][MAXN]; char ans1[MAXN]; ...
2025-08-16
0
50
题解 | 合唱队形
//从左向右看,1至i为递增序列,从右向左看,从k至i为递增序列,两者之和减一为总序列长度, //分别计算位置i处的递增序列与递减序列,相加减一得到最大值 #include<iostream> #include<cstdio> using namespace std; con...
2025-08-15
0
36
题解 | 最大上升子序列和
#include<iostream> #include<cstdio> using namespace std; const int MAXN=1000; int dp[MAXN]; int arr[MAXN]; int Function(int n){ int an...
2025-08-15
0
39
题解 | 拦截导弹
#include<iostream> #include<cstdio> using namespace std; const int MAXN=25; int dp[MAXN]; int arr[MAXN]; int Function(int n){ int answ...
2025-08-15
0
28
题解 | 最大连续子序列
//添加一个大小为2的数组记录起点和终点 //终点易确定,只要序列值增加,更新终点 //记录每次起点,序列值增加更新最大起点(序列值增加未必有新起点) #include<iostream> #include<cstdio> #include<queue> #inc...
2025-08-15
0
29
题解 | 最大子矩阵
#include<iostream> #include<cstdio> #include<climits> using namespace std; const int MAXN =100; int martix[MAXN][MAXN]; int total[MA...
2025-08-15
0
46
题解 | 吃糖果
#include<iostream> #include<cstdio> using namespace std; const int MAXN=21; long long dp[MAXN]; int main(){ dp[0]=1; dp[1]=1; ...
2025-08-15
0
37
题解 | N阶楼梯上楼问题
//第n阶台阶由第n-1阶走一步和第n-2阶走一个2步 #include<iostream> #include<cstdio> using namespace std; const int MAXN =91; long long int dp[MAXN]; int main(...
2025-08-15
0
48
首页
上一页
1
2
3
4
下一页
末页