码迷,mamicode.com
首页 >  
搜索关键字:largest rectangular    ( 1806个结果
POJ 2559 - Largest Rectangle in a Histogram - [单调栈]
题目链接:http://poj.org/problem?id=2559 题意: 给出 $n(1 \le n \le 10^5)$ 个宽为 $1$,高为 $h_i(0 \le h_i \le 10^9)$ 的矩形,它们从原点开始并排在 $x$ 轴上, 现在要求出,这个合并产生的图形内部最大的矩形的面积 ...
分类:其他好文   时间:2018-11-04 21:23:17    阅读次数:151
Hdoj 1312.Red and Black 题解
Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black til ...
分类:其他好文   时间:2018-11-04 01:45:56    阅读次数:190
动态规划——Split Array Largest Sum
题意大概就是,给定一个包含非负整数的序列nums以及一个整数m,要求把序列nums分成m份,并且要让这m个子序列各自的和的最大值最小(minimize the largest sum among these m subarrays)。 Note:If n is the length of array ...
分类:其他好文   时间:2018-11-03 12:43:01    阅读次数:170
179. Largest Number
Given a list of non negative integers, arrange them such that they form the largest number. Example 1: Input: [10,2] Output: "210" Example 2: Input: [ ...
分类:其他好文   时间:2018-10-30 10:20:13    阅读次数:155
【LeetCode】堆 heap(共31题)
【23】 Merge k Sorted Lists 【215】 Kth Largest Element in an Array (无序数组中最小/大的K个数) 给了一个无序数组,可能有重复数字,找到第 k 个最大的元素并且返回这个元素值。 题解:直接用直接用个堆保存数组中最大的 K 个数。时间复杂度 ...
分类:其他好文   时间:2018-10-30 00:26:09    阅读次数:207
84. Largest Rectangle in Histogram
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:其他好文   时间:2018-10-25 14:18:47    阅读次数:165
Codeforces 527C Glass Carving (最长连续0变形+线段树)
Leonid wants to become a glass carver (the person who creates beautiful artworks by cutting the glass). He already has a rectangular w mm × h mm sheet ...
分类:其他好文   时间:2018-10-23 14:44:22    阅读次数:176
Gym - 101915D Largest Group 最大团
给你一个二分图 问你最大团为多大 解一:状压DP 解二:二分图最大匹配 二分图的最大团=补图的最大独立集 二分图最大独立集=二分图定点个数-最大匹配 //Hungary #include<bits/stdc++.h> using namespace std; #define N 50 int use ...
分类:其他好文   时间:2018-10-20 23:50:28    阅读次数:360
LeetCode 703. Kth Largest Element in a Stream
原题链接在这里:https://leetcode.com/problems/kth-largest-element-in-a-stream/description/ 题目: Design a class to find the kth largest element in a stream. Not ...
分类:其他好文   时间:2018-10-14 11:39:49    阅读次数:176
HISTOGRA - Largest Rectangle in a Histogram
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn=1e5+7; 7 int n,fr1,fr2,tl1,tl2,ans; 8 int h[maxn],l[maxn],r[maxn],... ...
分类:其他好文   时间:2018-10-13 02:30:36    阅读次数:190
1806条   上一页 1 ... 22 23 24 25 26 ... 181 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!