1103: 开心的金明 摘要:解题思路:背包问题,解法和采药一模一样!传送面板已上线,我们的行动会更加快捷:https://blog.dotcpp.com/a/85195注意事项:动态规划的真谛就是状态转移方程!参考代码:// 题…… 题解列表 2022年03月14日 0 点赞 0 评论 295 浏览 评分:9.9
C++代码,新手易理解 摘要:解题思路:这道题,虽说很简单,但坑了我好久。思路是找一个小的和一个大的加在一起,但是普通的排序可能会超时,所以用桶排序。坑点在于:可能出现两个相同的数相加的情况,这个第一次没有考虑到。代码如下:注意事…… 题解列表 2022年03月14日 0 点赞 0 评论 615 浏览 评分:9.9
编写题解 1147: C语言训练-角谷猜想 摘要:解题思路:按题意注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; while(n!…… 题解列表 2022年03月14日 0 点赞 0 评论 450 浏览 评分:9.9
蓝桥杯算法提高VIP-和最大子序列 摘要:#include<iostream>using namespace std;int ans=-1001;const int N=100000;int a[N];int main(){ int n…… 题解列表 2022年03月14日 0 点赞 0 评论 168 浏览 评分:0.0
2610: 蓝桥杯2021年第十二届省赛真题-杨辉三角形 摘要:解题思路:参考 https://blog.csdn.net/zy98zy998/article/details/122293334注意事项:参考代码:#include<iostream> using…… 题解列表 2022年03月14日 0 点赞 1 评论 3056 浏览 评分:8.0
[递归]母牛的故事 摘要:#include<iostream>using namespace std;const int N=1000;int s[N],a[N],b[N],c[N],d[N];int main(){ s…… 题解列表 2022年03月14日 0 点赞 0 评论 214 浏览 评分:0.0
1575: 蓝桥杯算法提高VIP-递归倒置字符数组 摘要://从中间开始循环就行!!#include<iostream>#include<string>using namespace std;string a;int n,i=0;void digui(int…… 题解列表 2022年03月14日 0 点赞 0 评论 197 浏览 评分:0.0
编写题解 2056: 汉诺塔 利用栈和递归解决 摘要:#include <iostream>#include <stack>using namespace std;stack<int> s[3];void move(int x, int y,int n)…… 题解列表 2022年03月14日 0 点赞 0 评论 336 浏览 评分:0.0
模拟,一道水题 摘要:```cpp #include using namespace std; int main(){ string s1, s2; cin >> s1 >> s2; int le…… 题解列表 2022年03月14日 0 点赞 1 评论 429 浏览 评分:9.9
双指针o(n)!! 摘要:```cpp #include using namespace std; int main(){ string s1; getline(cin, s1); int max_…… 题解列表 2022年03月14日 0 点赞 0 评论 394 浏览 评分:9.9