上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页
摘要: 动态规划中优化枚举 121. 买卖股票的最佳时机 #include <iostream> #include <vector> using namespace std; class Solution { public: int maxProfit(vector<int> &prices) { int 阅读全文
posted @ 2025-05-13 22:55 _Sylvan 阅读(12) 评论(0) 推荐(0)
摘要: C++ 编译过程 源文件: #include <iostream> #define M "Result: " int add(int a, int b) { return a + b; } int main() { int result = add(3, 4); // 在预处理阶段 M 会被替换成 阅读全文
posted @ 2025-05-13 17:13 _Sylvan 阅读(40) 评论(0) 推荐(0)
摘要: 数位DP(下) P2657 [SCOI2009] windy 数 #include <iostream> #include <vector> using namespace std; vector<vector<vector<int>>> dp; // 剩下 len 位没有确定 // 上一位数字为 阅读全文
posted @ 2025-05-13 13:54 _Sylvan 阅读(25) 评论(0) 推荐(1)
摘要: 数位DP(上) 357. 统计各位数字都不同的数字个数 using namespace std; class Solution { public: int countNumbersWithUniqueDigits(int n) { if (n == 0) return 1; int res = 10 阅读全文
posted @ 2025-05-12 23:45 _Sylvan 阅读(15) 评论(0) 推荐(1)
摘要: 状压DP(下) 1434. 每个人戴不同帽子的方案数 #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int MOD = 1e9 + 7; 阅读全文
posted @ 2025-05-12 15:47 _Sylvan 阅读(16) 评论(0) 推荐(0)
摘要: 状压DP(上) 464. 我能赢吗 #include <iostream> #include <vector> using namespace std; class Solution { public: bool canIWin(int n, int m) { if (m == 0) return 阅读全文
posted @ 2025-05-12 01:15 _Sylvan 阅读(17) 评论(0) 推荐(1)
摘要: 树型DP(下) 2477. 到达首都的最少油耗 #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int MAXN = 100001; // 阅读全文
posted @ 2025-05-11 18:04 _Sylvan 阅读(10) 评论(0) 推荐(0)
摘要: 树型DP(上) 最大BST子树 #include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; class TreeNode { public: int val; T 阅读全文
posted @ 2025-05-10 02:21 _Sylvan 阅读(9) 评论(0) 推荐(0)
摘要: 区间DP 括号区间匹配 记忆化搜索 #include <iostream> #include <vector> #include <algorithm> using namespace std; int recursion(vector<char> &s, int l, int r, vector< 阅读全文
posted @ 2025-05-06 15:58 _Sylvan 阅读(19) 评论(0) 推荐(0)
摘要: 区间DP 1312. 让字符串成为回文串的最少插入次数 基于两侧端点讨论的可能性展开 暴力递归 #include <iostream> #include <vector> using namespace std; class Solution { public: int minInsertions( 阅读全文
posted @ 2025-05-05 19:06 _Sylvan 阅读(27) 评论(0) 推荐(0)
摘要: title: Factorio开服 date: 2024-11-03 10:31:24 +0800 categories: [other, server] tags: [Server, Linux, Docker, Factorio] description: 在服务器上开服和通过 Docker 开 阅读全文
posted @ 2024-11-03 10:37 _Sylvan 阅读(438) 评论(0) 推荐(1)
摘要: title: 使用Docker搭建Chirpy博客 date: 2024-10-25 02:01:02 +0800 categories: [other, blog] tags: [Blog, Chripy, Docker] description: 制作镜像部署Chirpy 使用Docker搭建C 阅读全文
posted @ 2024-10-25 02:03 _Sylvan 阅读(78) 评论(0) 推荐(0)
摘要: title: Docker Compose date: 2024-10-24 12:08:20 +0800 categories: [other, docker] tags: [Docker] description: 命令式安装以及 compose.yaml 文件 Docker Compose 上 阅读全文
posted @ 2024-10-24 13:13 _Sylvan 阅读(27) 评论(0) 推荐(0)
摘要: title: Dockerfile date: 2024-10-24 01:07:13 +0800 categories: [other, docker] tags: [Docker] description: 镜像制作、Docker 分层存储机制 Dockfile 官方文档 操作说明 描述 ADD 阅读全文
posted @ 2024-10-24 13:12 _Sylvan 阅读(62) 评论(0) 推荐(0)
摘要: title: Docker快速使用 date: 2024-10-22 11:17:34 +0800 categories: [other, docker] tags: [Docker] description: 镜像操作、容器操作、保存以及分享镜像、目录挂载、卷映射、自定义网络 Docker快速使用 阅读全文
posted @ 2024-10-22 23:23 _Sylvan 阅读(70) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页