搞半天原来是折半向下递归啊 题目讲的一点都不清楚 这里用dfs+打表 摘要: #include using namespace std; //打表 const int N=1e3+10; int dp[N]; int dfs(int n) { i…… 题解列表 2025年04月25日 0 点赞 0 评论 104 浏览 评分:0.0
C++:暴力【刚刚好10以内可以使用】 摘要:解题思路: 我就是看着下面这个图片解题的,然后一点点调试代码( -_- ) ,例如在每一个while循环里面都尝试过对应 i 和 j ,然后根据输出结果一点点找问题改注意事项:参考代码:#includ…… 题解列表 2025年04月28日 0 点赞 0 评论 116 浏览 评分:0.0
矩阵面积相交 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j,x1[1000],x2[1000],y1[1000],y2[…… 题解列表 2025年04月29日 0 点赞 0 评论 72 浏览 评分:0.0
C++:动态规划记忆化【涉及递归】 摘要:解题思路:记忆化就是把计算过的存储起来,下一次需要的时候直接使用就可以注意事项:参考代码:#include <iostream>#include<vector>using na…… 题解列表 2025年04月29日 0 点赞 0 评论 138 浏览 评分:0.0
C++:set容器+vector容器+更改set容器排列规则 摘要:解题思路:注意事项://修改方法2// 比较函数bool compare(int a, int b){ return a > b; // 这里定…… 题解列表 2025年04月29日 1 点赞 0 评论 117 浏览 评分:0.0
题解 1072: 汽水瓶,递归 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int num;//可以喝的汽水数量void fun(int len) {//len是空瓶子数量 …… 题解列表 2025年05月01日 1 点赞 0 评论 143 浏览 评分:0.0
T1003 密码破译 摘要:解题思路:注意事项:参考代码:s=input()lst=[]lst=[ord(i) for i in s]for i in lst: i=chr(i+4) &nb…… 题解列表 2025年05月01日 1 点赞 0 评论 497 浏览 评分:0.0
T1004 母牛递归 摘要:解题思路:注意事项:参考代码:def f(n): if m[n]!=0: return m[n]  …… 题解列表 2025年05月01日 1 点赞 0 评论 697 浏览 评分:0.0
数列排序(C++)笔记 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ …… 题解列表 2025年05月01日 1 点赞 0 评论 224 浏览 评分:0.0
邮局选址问题:贪心策略-横纵坐标中位数 摘要:解题思路: 贪心策略, 横纵坐标中位数注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;const&nb…… 题解列表 2025年05月02日 0 点赞 0 评论 71 浏览 评分:0.0