单调栈
文章平均质量分 77
SSL_MYD
这个作者很懒,什么都没留下…
展开
-
【POJ】2796 Feel Good
【POJ】2796 Feel Good Time Limit: 3000MS Memory Limit: 65536K Case Time Limit: 1000MS Special Judge Description Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days infl原创 2021-03-10 17:25:46 · 100 阅读 · 0 评论 -
【POJ】3494 Largest Submatrix of All 1’s
【POJ】3494 Largest Submatrix of All 1’s Time Limit: 5000MS Memory Limit: 131072K Case Time Limit: 2000MS Description 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 el原创 2021-03-10 16:53:14 · 82 阅读 · 0 评论 -
【CodeForce】817D Imbalanced Array
【CodeForce】817D Imbalanced Array time limit per test:2 seconds memory limit per test:256 megabytes inputstandard input outputstandard output Description You are given an array a consisting of n elements. The imbalance value of some subsegment of this array原创 2021-03-09 21:29:58 · 167 阅读 · 0 评论 -
【POJ】2559 Largest Rectangle in a Histogram
【POJ】2559 Largest Rectangle in a Histogram Time Limit: 1000MS Memory Limit: 65536K Description 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. F原创 2021-03-09 20:16:37 · 86 阅读 · 0 评论 -
【SSL】2882排队
【SSL】2882排队 Time Limit:1000MS Memory Limit:65536K Description n个人排成一条直线(一排),给出队伍中每个人的身高,每个人只能看到站在他右边且个头比他小没有被其他人挡住(跟他身高相同也会挡出他)的人。请求出所有人可以看到的人数之和。 1<=N<=80,000 Input Output Sample Input 6 10 3 7 4 12 2 Sample Output 5 思路 两重循环查会超时 用单调栈优化 代码 #inc原创 2021-03-06 16:29:44 · 97 阅读 · 0 评论