题目链接: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
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
题意大概就是,给定一个包含非负整数的序列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
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
【23】 Merge k Sorted Lists 【215】 Kth Largest Element in an Array (无序数组中最小/大的K个数) 给了一个无序数组,可能有重复数字,找到第 k 个最大的元素并且返回这个元素值。 题解:直接用直接用个堆保存数组中最大的 K 个数。时间复杂度 ...
分类:
其他好文 时间:
2018-10-30 00:26:09
阅读次数:
207
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
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
给你一个二分图 问你最大团为多大 解一:状压DP 解二:二分图最大匹配 二分图的最大团=补图的最大独立集 二分图最大独立集=二分图定点个数-最大匹配 //Hungary #include<bits/stdc++.h> using namespace std; #define N 50 int use ...
分类:
其他好文 时间:
2018-10-20 23:50:28
阅读次数:
360
原题链接在这里: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
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