04 2024 档案

摘要:单调栈 单调栈:基于栈的数据结构,栈中数据从栈底至栈顶具有单调性,序列中每个元素都必须要进入一次单调栈。由于单调性,序列元素无需时刻都保留在单调栈内。 应用:求解 N G E / N L E NGE/NLE NGE/NLE、 P G E / P L E PGE/PLE PGE/PLE类问题(序列中下 阅读全文
posted @ 2024-04-26 19:27 椰萝Yerosius 阅读(1) 评论(0) 推荐(0) 编辑
摘要:2023蓝桥省赛B组 B题 飞机降落 题解 标准深搜板子题,难度不大 #include<bits/stdc++.h> using namespace std; #define MAX 10 struct node{ int t,d,l;//t:飞机到达时间 d:飞机最大盘旋时间 l:飞机降落所需时间 阅读全文
posted @ 2024-04-11 19:48 椰萝Yerosius 阅读(2) 评论(0) 推荐(0) 编辑
摘要:全排列问题 数字序列 [ l , r ] [l,r] [l,r]​区间内元素的全排列问题 extern int l,r,num; vector<int>ans; vector<bool>f(r+1);//标记数组,用于剪枝 void dfs(int cl){//cl:current left,本次递 阅读全文
posted @ 2024-04-04 14:56 椰萝Yerosius 阅读(2) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示