#题目 > Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the ...
分类:
其他好文 时间:
2014-11-08 10:36:12
阅读次数:
201
题意 给n个条形的高度, 问能放的最大矩形面积分析: 从左到右 从右到左 各搞一遍分别记录 L[i]记录列(从前往后)标 第几列开始 可以往后放高度为a[i]的矩形 R[i]记录列(从后往前)标 第几列开始 可以往前放高度为a[i]的矩形R[i]-L[i]+1即为高度为a[i]的矩形能...
分类:
其他好文 时间:
2014-11-08 10:27:39
阅读次数:
181
Problem DescriptionFor this problem, you will write a program that prints theNthlargest value in a fixed sized array of integers. To make things simpl...
分类:
其他好文 时间:
2014-11-06 21:45:05
阅读次数:
177
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t...
分类:
其他好文 时间:
2014-11-05 22:59:32
阅读次数:
228
参数数量可变的方法public static double max(double... values)//double...是一个数据类型,对于实现者来说,double...与double[]完全一样{ double largest = Double.MIN_VALUE; for(...
分类:
其他好文 时间:
2014-11-05 19:03:18
阅读次数:
160
Red and Black
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 23001
Accepted: 12407
Description
There is a rectangular room, covered with square tiles. E...
分类:
其他好文 时间:
2014-11-05 17:16:24
阅读次数:
161
题目大意:有个字母矩阵,包含字母"a、b、c、w、x、y、z",其中,w能变为"a、b",
x能变为"b、c",y能变为"a、c",z能变为"a、b、c"。问能构成的最大字母完全一样的子
矩阵面积为多大?
思路:和HDU1505、HDU1506一样的思路,其中a[i][j]表示转换为字母a后以第i行为底,
第j列上方连续空闲位置的高度。b[i][j]表示字母b……,c[i][j]表示字母c……
遍历计算出该点向左右两边延伸的左右边界,从而计算出面积,最终比较计算出最大面积。...
分类:
其他好文 时间:
2014-11-04 17:20:19
阅读次数:
230
题目描述:
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has t...
分类:
其他好文 时间:
2014-11-03 22:35:55
阅读次数:
168
"Bored? Let's play table football!"
The table football is played on a rectangular table, usually contains m rows of players which are plastic, metal, wooden, or sometimes carbon-fibre figures mounted...
分类:
其他好文 时间:
2014-11-03 14:35:59
阅读次数:
316
#include
#include
#include
using namespace std;
const int MAX=1000001;
bool nums[MAX];
int indexes[MAX];
void eraosthenes()
{
int n=sqrt((double)MAX);
for(int i=2; i<=n; i++)
{
...
分类:
其他好文 时间:
2014-11-02 16:31:15
阅读次数:
167