![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
单调队列
文章平均质量分 83
闻道-问道
这个作者很懒,什么都没留下…
展开
-
Largest Rectangle in a Histogram (单调队列)
Problem DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figu原创 2017-08-10 20:47:23 · 1936 阅读 · 0 评论 -
Sliding Window (单调队列)
Problem DescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of sizek which is moving from the very left of the array to the very right. You can only see thek numbers i原创 2017-08-11 21:26:07 · 316 阅读 · 0 评论 -
Bad Hair Day (单调队列)
Problem DescriptionSome of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows t原创 2017-08-12 20:12:01 · 322 阅读 · 0 评论 -
Largest Submatrix of All 1’s (单调队列)
Problem DescriptionGiven a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? Bylargest we mean that the submatrix has the most elements.InputThe input contai原创 2017-08-12 20:24:41 · 509 阅读 · 2 评论 -
Terrible Sets (单调队列)
Problem DescriptionLet N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elements in N, and w0 = 0.Define set B =原创 2017-08-14 19:35:45 · 278 阅读 · 0 评论 -
Sticks Problem
Problem DescriptionXuanxuan has n sticks of different length. One day, she puts all her sticks in a line, represented by S1, S2, S3, ...Sn. After measuring the length of each stick Sk (1 <= k <= n),原创 2017-08-14 19:38:47 · 355 阅读 · 0 评论