会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
妖妖灵
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2019年8月10日
HDU 2586 How far away ?【LCA模板题】
摘要: 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=2586题意:给你N个点,M次询问。1~N-1行输入点与点之间的权值,之后M行输入两个点(a,b)之间的最近距离;思路:...
阅读全文
posted @ 2019-08-10 10:41 是妖妖灵鸭
阅读(91)
评论(0)
推荐(0)
2019年8月9日
POJ 3660 Cow Contest【Floyd 传递闭包】
摘要: 传送门:http://poj.org/problem?id=3660 题意:有n头牛, 给你m对关系。(a, b)表示牛a能打败牛b, 求在给出的这些关系下, 能确定多少头牛的排名。 传递闭包: 关系之间具有传递性(例如a> b, b> c, 那么a> c), 在那些已给出的关系基础上, 通过传递性
阅读全文
posted @ 2019-08-09 23:04 是妖妖灵鸭
阅读(111)
评论(0)
推荐(0)
2019年8月7日
HDU 2544 最短路 【Dijkstra模板题】
摘要: 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=2544思路:最短路的模板题Dijkstra 算法是一种类似于贪心的算法,步骤如下:1、当到一个点时,图上部分的点的最短...
阅读全文
posted @ 2019-08-07 22:52 是妖妖灵鸭
阅读(86)
评论(0)
推荐(0)
POJ 2631 Roads in the North
摘要: Description Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such th
阅读全文
posted @ 2019-08-07 22:37 是妖妖灵鸭
阅读(227)
评论(0)
推荐(0)
2019年8月6日
POJ 3585 Accumulation Degree【换根DP】
摘要: 传送门:http://poj.org/problem?id=3585题意:给定一张无根图,给定每条边的容量,随便取一点使得从这个点出发作为源点,发出的流量最大,并且输出这个最大的流量。 思路:最近开始做树形DP这...
阅读全文
posted @ 2019-08-06 21:30 是妖妖灵鸭
阅读(101)
评论(0)
推荐(0)
图的储存之邻接表
摘要: 邻接表的学习之前我们介绍过图的邻接矩阵存储法,它的空间和时间复杂度都是N2,现在我来介绍另外一种存储图的方法:邻接表,这样空间和时间复杂度就都...
阅读全文
posted @ 2019-08-06 13:42 是妖妖灵鸭
阅读(342)
评论(0)
推荐(0)
2019年8月4日
POJ 2796 Feel Good 【单调栈】
摘要: 传送门:http://poj.org/problem?id=2796题意:给你一串数字,需要你求出(某个子区间乘以这段区间中的最小值)所得到的最大值例子:63 1 6 4 5 2 当L=3,R=5时这段区间总和为...
阅读全文
posted @ 2019-08-04 22:59 是妖妖灵鸭
阅读(92)
评论(0)
推荐(0)
2019年8月3日
2019牛客暑期多校训练营(第五场)B.generator 1
摘要: 传送门:https://ac.nowcoder.com/acm/contest/885/B题意:给出,由公式 求出思路:没学过矩阵快速幂。题解说是矩阵快速幂,之后就学了一遍。(可以先去学一下矩阵快速幂)构造。然后...
阅读全文
posted @ 2019-08-03 22:32 是妖妖灵鸭
阅读(95)
评论(0)
推荐(0)
2019年7月29日
POJ 1952 BUY LOW, BUY LOWER
摘要: 传送门:http://poj.org/problem?id=1952题意:给你n个数,计算最长下降子序列的个数(并且不能重复)例如 5 3 5 3 该序列中 最长下降子序列的个数只有一个思路:长度的话用进行转移...
阅读全文
posted @ 2019-07-29 21:14 是妖妖灵鸭
阅读(121)
评论(0)
推荐(0)
2019年7月28日
洛谷 P3808 【模板】AC自动机(简单版)
摘要: 传送门:https://www.luogu.org/problem/P3808题解:是一个AC自动机的裸题了,注释加在代码里面了#includeusing namespace std;const int maxn...
阅读全文
posted @ 2019-07-28 23:21 是妖妖灵鸭
阅读(102)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告