单调栈
文章平均质量分 82
圣诞老人家
这个作者很懒,什么都没留下…
展开
-
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 ne原创 2017-08-07 14:50:04 · 163 阅读 · 0 评论 -
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.原创 2017-08-07 15:23:53 · 338 阅读 · 0 评论 -
单调栈
单调栈与单调队列很相似。首先栈是后进先出的,单调性指的是严格的递增或者递减。 单调栈有以下两个性质: 1、若是单调递增栈,则从栈顶到栈底的元素是严格递增的。若是单调递减栈,则从栈顶到栈底的元素是严格递减的。 2、越靠近栈顶的元素越后进栈。 单调栈与单调队列不同的地方在于栈只能在栈顶操作,因此一般在应用单调栈的地方不限定它的大小,否则会造成元素无法进栈。 元素进栈过程:原创 2017-08-07 15:26:43 · 148 阅读 · 0 评论