单调栈
你TB了
这个作者很懒,什么都没留下…
展开
-
Largest Rectangle in a Histogram@HDU 1506
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-07-27 17:33:54 · 109 阅读 · 0 评论 -
单调栈总结
原博主博客 单调栈总结 目录 定义 性质 功能 定义 性质 下面引自百度百科 单调递增或单调减的栈,跟单调队列差不多,但是只用到它的一端,利用它可以用来解决一些ACM/ICPC和OI的题目,如RQNOJ 的诺诺的队列等。 单调栈是一种特殊的栈,特殊之处在于栈内的元素都保持一个单调性。 假设下图是一个栈内元素的排列情况(单调递增的栈): 此时插入情况有两种: (1)...转载 2018-07-27 17:44:13 · 303 阅读 · 0 评论 -
Largest Submatrix of All 1’s@POJ 3494
Given a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? By largest we mean that the submatrix has the most elements. Input The input contains multiple test cases. Each ...原创 2018-08-01 17:53:36 · 227 阅读 · 0 评论 -
Feel Good@POJ 2796
Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent people's memories about some period of life. A new i...原创 2018-08-02 10:35:53 · 135 阅读 · 0 评论