随笔分类 -  单调栈

摘要:GMOJ 6808. 【2020.10.29提高组模拟】easy 题目描述 JKLover 很喜欢数值连续的区间,现在他有一个大小为 n 的数组 a,他想知道有多少对(l,r)满足1 ≤ l ≤ r ≤ n,且把a[l], a[l + 1], . . . , a[r]排序后相邻数差的绝对值不超过 1 阅读全文
posted @ 2020-11-01 10:24 Mohogany 阅读(429) 评论(0) 推荐(0)
摘要:Vasya likes to travel by train, but doesn't like when the car he travels in is located in the tail of the train. Vasya gets on the train at the statio 阅读全文
posted @ 2020-09-24 21:01 Mohogany 阅读(128) 评论(0) 推荐(0)