
栈
w_m_wm_wm_wm_w_m
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ - 3250 Bad Hair Day
题目 Some 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 that can see the top ...原创 2019-08-01 20:20:24 · 124 阅读 · 0 评论 -
hdu1506 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 sho...原创 2019-07-31 19:45:16 · 105 阅读 · 0 评论 -
AcWing150 括号画家 栈
题目 达达是一名漫画家,她有一个奇特的爱好,就是在纸上画括号。 这一天,刚刚起床的达达画了一排括号序列,其中包含小括号( )、中括号[ ]和大括号{ },总长度为N。 这排随意绘制的括号序列显得杂乱无章,于是达达定义了什么样的括号序列是美观的: (1) 空的括号序列是美观的; (2) 若括号序列A是美观的,则括号序列 (A)、[A]、{A} 也是美观的; (3) 若括号序列A、B都是美观的,则括号...原创 2019-07-27 21:29:28 · 319 阅读 · 0 评论 -
POJ 3494 Largest Submatrix of All 1’s
题目 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 ...原创 2019-08-01 19:35:23 · 148 阅读 · 0 评论