摘要:
动态规划中优化枚举 121. 买卖股票的最佳时机 #include <iostream> #include <vector> using namespace std; class Solution { public: int maxProfit(vector<int> &prices) { int 阅读全文
posted @ 2025-05-13 22:55
n1ce2cv
阅读(2)
评论(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 会被替换成 "R 阅读全文
posted @ 2025-05-13 17:13
n1ce2cv
阅读(1)
评论(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
n1ce2cv
阅读(4)
评论(0)
推荐(1)