superzcl
superzcl
全部文章
分类
ACM2018 and 2019 Exercise(28)
ACM模板(23)
AIstudy(1)
BFS(8)
C++学习笔记(20)
codeforces(13)
DFS(7)
hash哈希(2)
HDU100题(23)
Java 学习笔记(5)
KMP(2)
Python 学习笔记(8)
Python与爬虫(2)
sort+结构体(3)
STL(25)
string(1)
web设计(2)
二分和尺取(6)
人工智能学习(1)
位运算(2)
分治和递归(3)
前缀后缀差分打表(2)
动态规划(19)
博弈论(1)
图论(6)
康托和逆康托展开(1)
排序算法(2)
数学思维题(13)
数论(5)
最小生成树(3)
最短路(2)
未归档(85)
栈和队列(9)
模拟(3)
算法与数据结构(38)
算法与数据结构学习笔记(14)
线段树(5)
贪心(13)
软件安装(7)
速筛与快速幂(5)
面向对象(2)
归档
标签
去牛客网
登录
/
注册
成龙大侠
千里之行,始于足下
全部文章
(共420篇)
图论:树的直径(邻接表+bfs,模板)
树的直径求法,两边bfs,从任意一个点出发求出最长距离的终点,然后再从终点出发求出新的最长路,就是树的直径了。 #include <bits/stdc++.h> using namespace std; const int N = 10010; typedef pair<i...
2019-08-08
0
560
HDU 1811 Rank of Tetris(邻接表+拓扑排序+优先队列+并查集)
好题。 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1811 分析: #include <bits/stdc++.h> using namespace std; const int N = 10010; vecto...
2019-08-07
0
426
图论:拓扑排序(邻接矩阵,邻接表,优先队列,模板)
基于邻接矩阵实现的拓扑排序: #include <bits/stdc++.h> #include <cstdio> using namespace std; const int N = 110; int mp[N][N]; int vis[N]; int n, m; ...
2019-08-07
0
489
HDU100题 2090-2099
2090: #include <cstdio> #include <iostream> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); string ...
2019-08-07
0
375
HDU100题 2080-2089
2080: #include <bits/stdc++.h> using namespace std; int main() { int t; scanf("%d", &t); while(t--) { ...
2019-08-07
0
321
HPU100题 2070-2079
2070: #include <cstdio> using namespace std; typedef long long LL; LL a[55]; int main() { a[0] = 0; a[1] = 1; a[2] = 1; for...
2019-08-07
0
288
矩阵快速幂快速求斐波那契第n项
参考博客: http://blog.zhengyi.one/fibonacci-in-logn.html 原文是用python实现,这里改写成C++ #include <cstdio> #include <cstring> #include <algo...
2019-08-05
0
817
矩阵快速幂快速求斐波那契第n项
参考博客: http://blog.zhengyi.one/fibonacci-in-logn.html 原文是用python实现,这里改写成C++ #include <cstdio> #include <cstring> #include <algo...
2019-08-05
0
1561
HDU100题 2060-2069
2060: #include <cstdio> using namespace std; int ball[10] = {0}; int main() { int n; scanf("%d", &n); while(n--) ...
2019-08-02
0
253
HDU100题 2060-2069
2060: #include <cstdio> using namespace std; int ball[10] = {0}; int main() { int n; scanf("%d", &n); while(n--) ...
2019-08-02
0
392
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页