优质题解 1108: 守望者的逃离 摘要:解题思路:算是动态规划,但贪心一样可以做,就是蓝够就用闪烁,蓝不够就根据剩余蓝量、剩余时间、剩余距离决定是跑步还是闪烁。核心思想总结来说就是:每秒的当前总位移是选择闪烁(分为位移和休息)和选择跑步两者…… 题解列表 2022年03月08日 7 点赞 0 评论 2152 浏览 评分:9.0
信息学奥赛一本通T1268-完全背包问题 摘要:#include<iostream>using namespace std;int dp[10000];int w[205],c[205];int main(){ int m,n; cin…… 题解列表 2022年03月08日 0 点赞 0 评论 466 浏览 评分:8.0
Hifipsysta-2020-快速排序练习(C++代码) 摘要:```cpp #include using namespace std; const int MXN=1e5+10; int arr[MXN]; int Partition(int…… 题解列表 2022年03月08日 0 点赞 0 评论 451 浏览 评分:0.0
Hifipsysta-1716-数据结构-快速排序(C++代码) 摘要:```cpp #include using namespace std; const int MXN=1e5+10; int arr[MXN]; int Partition(int…… 题解列表 2022年03月08日 0 点赞 0 评论 476 浏览 评分:0.0
2048: 多重背包 摘要:将n个物品注意拆分转化为01背包问题#include<iostream>using namespace std;int dp[10000];int w[105],v[105],c[1050];int …… 题解列表 2022年03月08日 0 点赞 0 评论 441 浏览 评分:0.0
暴力求解,二分法优化,详细注释 摘要:```cpp #include #include using namespace std; int m, k; int b[505]; int l, r; int L[505], R[5…… 题解列表 2022年03月08日 0 点赞 0 评论 587 浏览 评分:8.1
x皇后问题【递归】【c++】 摘要:**思路** 回溯是按照深度搜索来的,搜索出来的第一个答案就是字典序就是最小,打印输出,直接退出 ```cpp #include using namespace std; int n; i…… 题解列表 2022年03月08日 0 点赞 0 评论 522 浏览 评分:9.9
蓝桥杯算法提高VIP-8皇后·改【递归回溯】 摘要:**核心代码:** ```cpp void dfs(int row) {//按行寻找皇后节点 if (row == 8) {//递归出口:行数达到8行,说明符合情况 …… 题解列表 2022年03月08日 0 点赞 0 评论 526 浏览 评分: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 评论 488 浏览 评分:0.0
1051: [编程入门]结构体之成绩统计2 摘要:解题思路:上题传送门:https://blog.dotcpp.com/a/84942上一题还没想好怎么用class代替struct,这一题机会就来了。构造方法和上题完全一致,都是定义包含N个对象的数组…… 题解列表 2022年03月07日 0 点赞 0 评论 563 浏览 评分:9.9