POJ 2082 Terrible Sets 已翻译
来源:互联网 发布:注册淘宝药店 编辑:程序博客网 时间:2024/06/07 05:53
描述
令N是所有自然数{0,1,2,...}的集合。。 。 },R是所有实数的集合。wi,hi,对于i = 1。 。 。 n是N中的一些元素,w 0 = 0。
定义集合B = {<x,y> | x,y∈R并且存在索引i> 0,使得0 <= y <= hi,Σ0<= j <= i-1wj <= x <=Σw<= j <= iwj}
再次,定义集合S = {A |对于一些W,H∈R+,A = WH,并且在N中存在x0,y0,使得集合T = {<x,y>x,y∈R且x0 <= x <= x0 + W,y0 <= y <= y0 + H}。
你的任务现在。什么是Max(S)?
哇,它看起来像一个可怕的问题。看起来可怕的问题有时很容易。
但对于这一个,相信我,这很困难。
输入
输入包括几个测试用例。对于每种情况,n在单行中给出,然后是n行,每行包含由单个空间分隔的w 1和h 1。输入的最后一行是单个整数-1,表示输入结束。您可以假设1 <= n <= 50000和w1h1 + w2h2 + ... + wnhn <109。
输出
对于每种情况,只需在一行中输出Max(S)。
0 0
- POJ 2082 Terrible Sets 已翻译
- POJ 2082 Terrible Sets
- poj 2082 Terrible Sets
- POJ 2082 Terrible Sets
- POJ 2082 Terrible Sets
- POJ 2082Terrible Sets
- poj 2082 Terrible Sets
- POJ 2082 Terrible Sets
- POJ 2082 Terrible Sets
- poj 2082 Terrible Sets
- poj 2082 Terrible Sets
- POJ 2082 Terrible Sets
- POJ 2082 Terrible Sets(栈)
- poj 2082——Terrible Sets
- POJ 2082 Terrible Sets(单调栈)
- POJ-2082 Terrible Sets (单调栈)
- POJ 2082 Terrible Sets 单调栈
- POJ 2082 Terrible Sets (栈)
- 封装MVC(一)
- 【1-1-1】
- Git Submodule 使用简介
- 如何提取flash游戏和保存其进度
- Step by Step,用JAVA做一个FLAPPYBIRD游戏(二)
- POJ 2082 Terrible Sets 已翻译
- 代码混淆/程序保护(对抗反汇编)原理与实践
- [centos] 环境安装之 mysql离线版压缩包(mysql-5.7.16-linux-glibc2.5-x86_64.tar)
- 【ife】任务十四:零基础JavaScript编码(二)
- MVC框架的封装(五)模型类
- POJ 3494 Largest Submatrix of All 1’s 已翻译
- 开启csdn博客之旅~
- c#总结(二)
- 表单设计过程中常见问题梳理