随笔分类 -  《进阶指南》数据结构

Supermarket(贪心)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef long long ll; typedef pair<int,int> PII; void solve() { int n; w 阅读全文
posted @ 2024-09-16 21:03 ruoye123456 阅读(5) 评论(0) 推荐(0) 编辑
P4551 最长异或路径(树上前缀异或01-trie)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-14 11:04 ruoye123456 阅读(3) 评论(0) 推荐(0) 编辑
P10471 最大异或对 The XOR Largest Pair(01trie)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-14 10:41 ruoye123456 阅读(5) 评论(0) 推荐(0) 编辑
P10470 前缀统计(trie树)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-14 10:29 ruoye123456 阅读(9) 评论(0) 推荐(0) 编辑
PERIOD - Period(kmp求border)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-14 10:11 ruoye123456 阅读(3) 评论(0) 推荐(0) 编辑
P10469 后缀数组(Hash+二分)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-14 09:49 ruoye123456 阅读(19) 评论(0) 推荐(0) 编辑
P10468 兔子与兔子(Hash)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 21:35 ruoye123456 阅读(7) 评论(0) 推荐(0) 编辑
P10467 [CCC 2007] Snowflake Snow Snowflakes(Hash)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 20:30 ruoye123456 阅读(11) 评论(0) 推荐(0) 编辑
P1168 中位数(对顶堆)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 20:15 ruoye123456 阅读(6) 评论(0) 推荐(0) 编辑
P1115 最大子段和(DP)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 17:25 ruoye123456 阅读(2) 评论(0) 推荐(0) 编辑
P10466 邻值查找
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 17:22 ruoye123456 阅读(7) 评论(0) 推荐(0) 编辑
Team Queue(队列)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 12:52 ruoye123456 阅读(17) 评论(0) 推荐(0) 编辑
HISTOGRA - 最大矩形面积(单调栈)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 11:57 ruoye123456 阅读(6) 评论(0) 推荐(0) 编辑
P1044 [NOIP2003 普及组] 栈
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 11:56 ruoye123456 阅读(6) 评论(0) 推荐(0) 编辑
P2201 数列编辑器(对顶栈)
摘要:#include<bits/stdc++.h> using namespace std; #define x first #define y second typedef pair<int,int> PII; typedef long long ll; typedef unsigned long l 阅读全文
posted @ 2024-09-13 11:55 ruoye123456 阅读(7) 评论(0) 推荐(0) 编辑