摘要: https://www.luogu.org/problemnew/show/CF1027C include include include include include include include include include include include include include 阅读全文
posted @ 2018-08-22 21:05 Roni_i 阅读(335) 评论(0) 推荐(1) 编辑
摘要: Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to k 阅读全文
posted @ 2018-08-22 16:51 Roni_i 阅读(149) 评论(0) 推荐(0) 编辑
摘要: LCA,最近公共祖先,实现有多种不同的方法,在树上的问题中有着广泛的应用,比如说树上的最短路之类。 LCA的实现方法有很多,比如RMQ、树链剖分等。 今天来讲其中实现较为简单的三种算法: RMQ+时间戳、树上倍增(类似二分步长)、Tarjan算法(DFS+并查集)。 阅读全文
posted @ 2018-08-22 13:35 Roni_i 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 【模板】洛谷P3865 include include include include include include include include include include include include include include include include include in 阅读全文
posted @ 2018-08-22 13:31 Roni_i 阅读(184) 评论(0) 推荐(0) 编辑