摘要: ## 题意 ​ 一个长度为 \(n\) 的排列 \(a\),求这个排列中有多少个区间 \([l,r]\),满足这个区间的 \(max-min=r-l\)。 ​ 数据范围:\(n \le 3 \times 10 ^ 5\)。 题解 ​ 考虑分治做法。 ​ 考虑分治区间 $[le,rig]$​,我们现在 阅读全文
posted @ 2021-08-07 10:11 red_giant_bear 阅读(84) 评论(0) 推荐(0)