阿拉贝尔
阿拉贝尔
全部文章
AcWing算...
AcWing other(1)
Acwing算法模板及理解(5)
AcWing算法竞赛进阶指南(3)
Mysql(1)
other(1)
洛谷(1)
归档
标签
去牛客网
登录
/
注册
wiseXu
请容我,再颓一次。20/10/12
全部文章
/ AcWing算法基础课
(共53篇)
AcWing 143. 最大异或对
AcWing 143. 最大异或对 /*暴力做法 int res=0; for(int i=0;i<n;i++) //枚举第一个数 for(int j=0;j<i;j++) //枚举第二个数 res=max(res,a[i]^a[j); */ #...
AcWing
算法竞赛进阶指南
2020-07-30
0
433
AcWing 240. 食物链
AcWing 240. 食物链 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int n,m; int p[N],d[N]; //find函数返回的是根节点 int find(int x){ ...
AcWing
2020-07-30
0
348
AcWing 838. 堆排序
AcWing 838. 堆排序 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int h[N],num; void down(int u){ int t=u; if(u*2<...
AcWing
2020-07-30
0
341
AcWing 840. 模拟散列表
AcWing 840. 模拟散列表 拉链法 #include <bits/stdc++.h> using namespace std; const int N=1e6+3; int h[N],e[N],ne[N],idx; void insert(int x){ int ...
AcWing
2020-07-30
0
364
AcWing 841. 字符串哈希
AcWing 841. 字符串哈希 #include <bits/stdc++.h> using namespace std; typedef unsigned long long ULL; const int N=1e6+10,P=131; int n,m; char str[...
AcWing
2020-07-30
0
308
AcWing 842. 排列数字
AcWing 842. 排列数字 #include <bits/stdc++.h> using namespace std; const int N=10; int n; int path[N]; bool st[N]; void dfs(int u){ if(u==n){...
AcWing
2020-08-01
0
382
AcWing 843. n-皇后问题
AcWing 843. n-皇后问题 /*按行枚举 #include <iostream> using namespace std; const int N=20; int n; char g[N][N]; bool col[N],dg[N],udg[N]; void dfs(in...
AcWing
2020-08-01
0
392
AcWing 846. 树的重心
AcWing 846. 树的重心 #include <bits/stdc++.h> using namespace std; const int N=1e5+10,M=2*N; int n; int h[N],e[M],ne[M],idx; bool st[N]; //去掉重心的所...
AcWing
2020-08-01
0
428
AcWing 847. 图中点的层次
AcWing 847. 图中点的层次 #include <bits/stdc++.h> using namespace std; const int N=1e5+10; int n,m; int h[N],e[N],ne[N],idx; int d[N],q[N]; void a...
AcWing
2020-08-01
0
399
AcWing 845. 八数码
AcWing 845. 八数码 /*y总写法,因为蓝桥杯不支持c++11,本题用map会超时,所以下面使用的是手写hash #include <bits/stdc++.h> using namespace std; queue<string> q; unordered_...
AcWing
2020-08-01
0
370
首页
上一页
1
2
3
4
5
6
下一页
末页