摘要: 题面:https://www.luogu.org/problem/P1083 cpp 一题简单的线段树(但在这题看来似乎是一种玄学算法) 开一个线段树维护区间最小值和支持区间修改即可 只要整个区间中有 include include include include include define MA 阅读全文
posted @ 2019-08-20 13:48 prestige 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题面:https://www.luogu.org/problem/P1983 cpp 首先我们来谈一谈邻接表+dfs: 假设有一辆车经过三个车站ai,aj,ak(ai,aj,ak车站编号递增) 那么在ai,aj之间的a(i+1),a(i+2),.......,a(j 1)的级别一定是严格小于ai和a 阅读全文
posted @ 2019-08-20 13:44 prestige 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 题面:https://www.luogu.org/problem/P5022 cpp 本题显然是一个基环树,然后由于一个基环上n条边只会走n 1条边,所以只要枚举要删的边再求解即可。 Code: include include include include include include incl 阅读全文
posted @ 2019-08-20 13:10 prestige 阅读(123) 评论(0) 推荐(0) 编辑