
单调队列
文章平均质量分 85
墨碎江南
这个作者很懒,什么都没留下…
展开
-
hdu3530 单调队列
There is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference between the maximum element and the minimum element of the su...原创 2018-07-18 11:42:29 · 180 阅读 · 0 评论 -
poj 1821 Fence(dp+单调队列优化)
Fence Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 5830 Accepted: 1857 Description A team of k (1 <= K <= 100) workers should paint a fence which contains N (...转载 2018-08-01 10:34:19 · 302 阅读 · 0 评论 -
Largest Rectangle in a Histogram (单调栈)
A 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 figure on the left shows ...原创 2018-08-02 09:20:59 · 372 阅读 · 0 评论 -
CodeForces 253D Table with Letters
Vasya has recently started to learn English. Now he needs to remember how to write English letters. He isn't sure about some of them, so he decided to train a little. He found a sheet of squared pape...原创 2018-08-07 09:20:28 · 252 阅读 · 0 评论 -
CF372C Watching Fireworks is Fun(dp+单调队列优化)
A festival will be held in a town's main street. There are n sections in the main street. The sections are numbered 1 through n from left to right. The distance between each adjacent sections is 1. I...原创 2018-08-02 18:42:52 · 510 阅读 · 0 评论