摘要: 题目描述: Farmer John has installed a new system of N−1N 1N−1 pipes to transport milk between the NNN stalls in his barn (2≤N≤50,0002 \leq N \leq 50,0002≤ 阅读全文
posted @ 2019-08-04 21:45 小张人 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Alyona and a tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Alyona has a tre 阅读全文
posted @ 2019-08-04 20:07 小张人 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 倍增法求lca(最近公共祖先) 基本上每篇博客都会有参考文章,一是弥补不足,二是这本身也是我学习过程中找到的觉得好的资料 思路: 大致上算法的思路是这样发展来的。 想到求两个结点的最小公共祖先,我们可以先把两个的深度提到同一水平,在一步一步往上跳,直到两个结点有了一个公共祖先,依照算法流程,这就是l 阅读全文
posted @ 2019-08-04 19:32 小张人 阅读(580) 评论(1) 推荐(2) 编辑
摘要: 题目描述: Jzzhu and Cities time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Jzzhu is the pres 阅读全文
posted @ 2019-08-04 11:08 小张人 阅读(324) 评论(0) 推荐(0) 编辑
分享到: