随笔分类 -  算法

摘要:title: template:动态规划 math : true date: 2024-10-20 tags: - 算法竞赛 categories: - 算法 背包问题 01背包 https://www.acwing.com/problem/content/2/ dp的过程可以理解为一个全局状态更新 阅读全文
posted @ 2025-05-11 21:52 bradinz 阅读(22) 评论(0) 推荐(0)
摘要:title: template:图论 math : true date: 2024-11-4 tags: - 算法竞赛 categories: - 算法 树的dfs dfs俗称爆搜,用于搜索所有情况 dfs需要维护的数据结构:表征当前遍历位置的u,表征某个状态是否被遍历过的st[N],(可能)当前遍 阅读全文
posted @ 2025-05-11 21:52 bradinz 阅读(30) 评论(0) 推荐(0)
摘要:title: template:数据结构 math : true date: 2024-10-27 tags: - 算法竞赛 categories: - 算法 双链表 #include<iostream> using namespace std; const int N = 100010; int 阅读全文
posted @ 2025-05-11 21:51 bradinz 阅读(10) 评论(0) 推荐(0)
摘要:title: template:base math : true date: 2025-2-11 19:40:52 tags: - 算法竞赛 categories: - 算法 快排 一般使用c++ stl即可,同时可以使用自定义cmp函数。std::sort在最坏情况下保持\(O(n log n)\ 阅读全文
posted @ 2025-05-11 21:51 bradinz 阅读(15) 评论(0) 推荐(0)