C++代码,新手易理解 摘要:解题思路:这道题,虽说很简单,但坑了我好久。思路是找一个小的和一个大的加在一起,但是普通的排序可能会超时,所以用桶排序。坑点在于:可能出现两个相同的数相加的情况,这个第一次没有考虑到。代码如下:注意事…… 题解列表 2022年03月14日 0 点赞 0 评论 696 浏览 评分:9.9
编写题解 1147: C语言训练-角谷猜想 摘要:解题思路:按题意注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; while(n!…… 题解列表 2022年03月14日 0 点赞 0 评论 541 浏览 评分: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 评论 244 浏览 评分:0.0
2610: 蓝桥杯2021年第十二届省赛真题-杨辉三角形 摘要:解题思路:参考 https://blog.csdn.net/zy98zy998/article/details/122293334注意事项:参考代码:#include<iostream> using…… 题解列表 2022年03月14日 0 点赞 1 评论 3111 浏览 评分: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 评论 291 浏览 评分: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 评论 285 浏览 评分: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 评论 401 浏览 评分:0.0
模拟,一道水题 摘要:```cpp #include using namespace std; int main(){ string s1, s2; cin >> s1 >> s2; int le…… 题解列表 2022年03月14日 0 点赞 1 评论 481 浏览 评分:9.9
双指针o(n)!! 摘要:```cpp #include using namespace std; int main(){ string s1; getline(cin, s1); int max_…… 题解列表 2022年03月14日 0 点赞 0 评论 505 浏览 评分:9.9
优质题解 1207: 字符排列问题 C++ STL容器 深度优先搜索DFS 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; map<char,int>m; //对排列中的字符进行查重 …… 题解列表 2022年03月14日 0 点赞 0 评论 686 浏览 评分:9.9