算法之单调栈&单调队列
cc_wood
这个作者很懒,什么都没留下…
展开
-
Terrible Sets POJ - 2082
题目链接:点我 Let N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elements in N, and w0 = 0. Define set B = {< x, y >原创 2017-07-21 14:23:36 · 292 阅读 · 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 ca原创 2017-07-21 14:31:39 · 381 阅读 · 0 评论 -
Bad Hair Day POJ - 3250
题目链接:点我 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 t原创 2017-07-22 09:45:52 · 270 阅读 · 0 评论 -
Sliding Window POJ - 2823
题目链接:点我 An array of size n ≤ 10 6 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window原创 2017-07-22 10:08:25 · 288 阅读 · 0 评论 -
Max Sum of Max-K-sub-sequence HDU - 3415
题目链接:点我 Given a circle sequence A11,A22,A33......Ann. Circle sequence means the left neighbour of A11 is Ann , and the right neighbour of Ann is A11. Now your job is to calculate the max sum of原创 2017-07-22 10:16:26 · 282 阅读 · 0 评论 -
Non-negative Partial Sums HDU - 4193
题目链接:点我 You are given a sequence of n numbers a 0,..., a n-1. A cyclic shift by k positions (0<=k<=n-1) results in the following sequence: a k a k+1,..., a n-1, a 0, a 1,..., a k-1. How many of the原创 2017-07-22 10:24:28 · 247 阅读 · 0 评论