蓝桥杯算法提高VIP-8皇后·改【递归回溯】 摘要:**核心代码:** ```cpp void dfs(int row) {//按行寻找皇后节点 if (row == 8) {//递归出口:行数达到8行,说明符合情况 …… 题解列表 2022年03月08日 0 点赞 0 评论 336 浏览 评分:9.9
Hifipsysta-1738-归并排序(C++代码)归并排序法 摘要:```cpp #include using namespace std; const int MXN=1e5+10; int arr[MXN]; int tmp[MXN]; void…… 题解列表 2022年03月08日 0 点赞 0 评论 345 浏览 评分:0.0
1051: [编程入门]结构体之成绩统计2 摘要:解题思路:上题传送门:https://blog.dotcpp.com/a/84942上一题还没想好怎么用class代替struct,这一题机会就来了。构造方法和上题完全一致,都是定义包含N个对象的数组…… 题解列表 2022年03月07日 0 点赞 0 评论 399 浏览 评分:9.9
Hifipsysta-2088-蓝桥杯算法提高VIP-快速幂(C++代码) 摘要:```cpp #include using namespace std; typedef unsigned long long ull; ull quickExp(ull x, ull …… 题解列表 2022年03月07日 0 点赞 0 评论 331 浏览 评分:8.0
1050: [编程入门]结构体之成绩记录 摘要:解题思路:一开始想用class代替struct,但是没想好怎么建对象的数组,就用struct了,实际上用class好像思路也是一样的。注意事项:(1)strcpy()函数要加<cstring>头。(2…… 题解列表 2022年03月07日 0 点赞 0 评论 411 浏览 评分:9.9
dp解题简单并且通过!!! 摘要:**解题思路:**dp:先把每一份装填1,剩下i-j份,再把i-j份分成1,2,3,4,5份用数组记录每n(1,2....)份的分法种数。 dp[i][j] = dp[i-j][1]+dp[i-j]…… 题解列表 2022年03月07日 0 点赞 0 评论 520 浏览 评分:6.0
运用数学规律解题 摘要:参考代码:```c++#include<iostream>using namespace std;int main() { int i, j; int a, b, n; cin >> n; while…… 题解列表 2022年03月07日 0 点赞 0 评论 189 浏览 评分:0.0
双序列型动态规划,编辑距离问题的变种 摘要:这个题可看作[编辑距离](https://www.dotcpp.com/oj/problem2141.html "编辑距离")问题的变种,可以参考我在那一篇的题解,内附了leetcode视频题解[信息…… 题解列表 2022年03月07日 0 点赞 0 评论 409 浏览 评分:9.9
1093: 字符逆序 摘要:```cpp #include using namespace std; int main(){ char str[100]; gets(str); //用gets输…… 题解列表 2022年03月07日 0 点赞 0 评论 292 浏览 评分:0.0
回形取数--简单 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){int m, n;cin >> m >> n;int num[500][…… 题解列表 2022年03月06日 0 点赞 0 评论 235 浏览 评分:0.0