单调栈
踢到火星
我是我生命的主宰
展开
-
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 of ...原创 2018-07-17 11:55:34 · 468 阅读 · 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-07-17 13:52:56 · 94 阅读 · 0 评论 -
Passing the Message
What a sunny day! Let’s go picnic and have barbecue! Today, all kids in “Sun Flower” kindergarten are prepared to have an excursion. Before kicking off, teacher Liu tells them to stand in a row. Teach...原创 2018-07-21 20:58:00 · 452 阅读 · 0 评论