AND20211201
AND20211201
全部文章
分类
dfs(1)
总结(28)
数据结构(1)
未归档(1)
洛谷(1)
题解(113)
归档
标签
去牛客网
登录
/
注册
AND20211201的博客
TA的专栏
17篇文章
0人订阅
未解决
2篇文章
309人学习
数据结构
15篇文章
391人学习
全部文章
(共149篇)
模拟散列表
来自专栏
拉链法 #include<iostream> #include<cstring> using namespace std; const int N = 100003;//N的值为质数,而且离2的幂越远越好,这样不容易冲突 int h[N], e[N], ne[N], idx;...
哈希函数
2022-05-17
1
336
模拟堆
来自专栏
#include<iostream> using namespace std; const int N = 1e5 + 10; int h[N]; int s; int ph[N], hp[N];//ph[i]存的是第i插入数的下标, hp[i]存的是第i个点在hp数组里的下标 ph[j...
2022-05-12
1
309
堆排序
来自专栏
支持的操作 1. 插入一个数 2. 求集合中的最小值 3. 删除最小值 4. 删除任意一个元素 5. 修改任意一个元素 小根堆: 父节点小于等于左右两个子节点的值。 储存方式: x的左儿子是2*x, 右儿子是2 * x + 1, 用一维数组来存储。 #include<iostream> ...
2022-05-12
1
343
最大异或对
来自专栏
Trie树的应用 #include<iostream> using namespace std; const int N = 1e5 + 10; int son[N * 31][2]; int idx; int a[N]; void insert(int x) { int p =...
2022-05-10
1
388
Trie树
来自专栏
Trie树是用来快速存储和查找字符串集合的数据结构 #include<iostream> using namespace std; const int N = 1e6; int n; int son[N][26];//26为存储字符的个数 int cnt[N];//以当前字符结尾的单词...
2022-05-09
1
283
KMP算法
来自专栏
next[i] = j的含义是: 字符串中的[1, j] 和 [i - j + 1, i]是相等的,并且长度最大。 #include<iostream> using namespace std; const int N = 1e6 + 10; char s[N], p[N]; int ...
2022-05-09
1
303
The least round way
#include<bits/stdc++.h> using namespace std; const int N = 1100; typedef pair<int, int> PII; int a[N][N]; int f[N][N][3]; int main() { i...
2022-05-06
1
279
镜子
#include<bits/stdc++.h> using namespace std; const int N = 1000; struct Mirror{ int a, b; char c; }q[N]; int n; int dy[4] = {1, 0, -1, 0...
2022-05-04
1
245
礼物
">#include<algorithm> using namespace std; const int N = 1e3 + 10; #define x first #define y second pair<int,int> a[N]; int b[N]; int cmp(...
2022-05-04
0
208
干草
#include<iostream> using namespace std; const int N = 10010; int a[N]; int main() { int n, sum = 0; cin >> n; int are = 0; ...
2022-05-03
1
244
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页