摘要: 贪心1 179. 最大数 #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; class Solution { public: // 暴力方法生成所有可能的 阅读全文
posted @ 2025-05-15 21:08 n1ce2cv 阅读(8) 评论(0) 推荐(0)
摘要: 动态规划中根据数据量猜解法 打怪兽 a[i] 范围大,b[i] 范围小的适用版本 #include <iostream> #include <vector> #include <climits> #include <algorithm> using namespace std; // 方法1:a[i 阅读全文
posted @ 2025-05-15 15:25 n1ce2cv 阅读(2) 评论(0) 推荐(1)
摘要: 动态规划中得到具体决策方案 最长公共子序列 #include <iostream> #include <vector> #include <string> using namespace std; // 最大字符串长度 const int MAXN = 5001; // dp[i][j] 表示 s1 阅读全文
posted @ 2025-05-15 13:16 n1ce2cv 阅读(1) 评论(0) 推荐(0)