蓝桥杯算法提高VIP-任意年月日历输出C++ 摘要:```cpp #include using namespace std; int a[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 }; bool…… 题解列表 2022年03月08日 0 点赞 0 评论 536 浏览 评分:0.0
蓝桥杯算法提高VIP-数组替换C++ 摘要:```cpp #include #include using namespace std; const int N = 100000; int a[N], b[N]; void add(i…… 题解列表 2022年03月08日 0 点赞 0 评论 570 浏览 评分:9.9
优质题解 1108: 守望者的逃离 摘要:解题思路:算是动态规划,但贪心一样可以做,就是蓝够就用闪烁,蓝不够就根据剩余蓝量、剩余时间、剩余距离决定是跑步还是闪烁。核心思想总结来说就是:每秒的当前总位移是选择闪烁(分为位移和休息)和选择跑步两者…… 题解列表 2022年03月08日 6 点赞 0 评论 1995 浏览 评分:8.9
信息学奥赛一本通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 评论 390 浏览 评分: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 评论 365 浏览 评分: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 评论 399 浏览 评分: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 评论 362 浏览 评分: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 评论 495 浏览 评分:8.1
x皇后问题【递归】【c++】 摘要:**思路** 回溯是按照深度搜索来的,搜索出来的第一个答案就是字典序就是最小,打印输出,直接退出 ```cpp #include using namespace std; int n; i…… 题解列表 2022年03月08日 0 点赞 0 评论 425 浏览 评分:9.9
蓝桥杯算法提高VIP-8皇后·改【递归回溯】 摘要:**核心代码:** ```cpp void dfs(int row) {//按行寻找皇后节点 if (row == 8) {//递归出口:行数达到8行,说明符合情况 …… 题解列表 2022年03月08日 0 点赞 0 评论 428 浏览 评分:9.9