利用类型转换解Hello, world! 摘要:解题思路:利用char,把int类型转换为char类型即可注意事项:参考代码:#include<iostream>using namespace std;int main(){int a = 0;wh…… 题解列表 2024年03月07日 1 点赞 0 评论 308 浏览 评分:10.0
DFS(深度优先遍历) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> #include<vector> using namespace std; int flag=0; class…… 题解列表 2024年03月07日 0 点赞 0 评论 782 浏览 评分:9.0
最长不下降子序列的长度(动态dp——寻找前一项的最优解) 摘要:解题思路:利用动态规划,确定出到每一个数字的时候,所对应的dp[i]为多少dp[i]表示为在第i个数字时,前i个数字能组成的最长不下降子序列的长度例如给出一个数列: 1 3 5 2 8 7dp[4]=…… 题解列表 2024年03月07日 0 点赞 0 评论 528 浏览 评分:9.9
C++老管家的忠诚(线段树做法) 摘要:区间查询,果断想到线段树,看了一下题解有很多用的st表,但感觉st表模板太难记了,线段树相对好记很多,还是线段树更香一点。树状数组也可以求最值但得改模板。参考代码:#include using nam…… 题解列表 2024年03月07日 0 点赞 0 评论 233 浏览 评分:9.9
小心:一系列整数可能会有相同的数 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <algorithm>#include <vector>using namespace std;struct tr…… 题解列表 2024年03月07日 0 点赞 0 评论 226 浏览 评分:0.0
过滤多余的空格 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s; getline(cin,s); stri…… 题解列表 2024年03月07日 0 点赞 0 评论 320 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-更小的数(C++解法) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<string> using namespace std; int length(string s) { …… 题解列表 2024年03月06日 0 点赞 1 评论 339 浏览 评分:7.3
3061: 公共子序列-动态规划 摘要: #include #include #include using namespace std; int dp[205][205]; int m…… 题解列表 2024年03月05日 0 点赞 0 评论 209 浏览 评分:0.0
计负均正 使用C++语言编写 代码可能不是最简洁的 但是通俗易懂 容易理解 适合入门的 欢迎大家一起讨论 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <iomanip>using namespace std;int main() { const int n …… 题解列表 2024年03月05日 0 点赞 0 评论 265 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:#include<iostream> using namespace std; const int MAX_N = 1e4 + 1; // 规定数据范围不超 int N, A[MAX_N], B…… 题解列表 2024年03月05日 0 点赞 0 评论 645 浏览 评分:9.9