BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16023Accepted Submission(s): 6770Problem...
分类:
其他好文 时间:
2015-09-15 00:15:16
阅读次数:
204
开始的代码,暴力求解。。。。。果断超时
#include
#include
#include
using namespace std;
const int maxn = 200005;
int main()
{
int h, w, k, b;
int a[maxn] ;
bool flag;
while(scanf("%d...
分类:
其他好文 时间:
2015-08-26 15:51:02
阅读次数:
148
Billboard
Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 15719 Accepted Submission(s): 6629
Problem Description
At the entranc...
分类:
其他好文 时间:
2015-08-20 18:55:52
阅读次数:
130
D - BillboardCrawling in process... Crawling failed Time Limit:8000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 279...
分类:
其他好文 时间:
2015-08-19 13:19:25
阅读次数:
134
Billboard
Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 15625 Accepted Submission(s): 6580
Problem Description
At the entranc...
分类:
其他好文 时间:
2015-08-15 11:56:52
阅读次数:
178
Billboard
Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 15595 Accepted Submission(s): 65...
分类:
其他好文 时间:
2015-08-13 17:58:55
阅读次数:
157
以h建树,不过要注意,当h>n时只需要1-n就够了
简单线段树,维护区间最大值
#include
#define maxn 222222
using namespace std;
struct stu
{
int left,right,max;
};
stu mapp[maxn*4];
int n,m,t,x;
void build(int l,int r,int count)
{
map...
分类:
其他好文 时间:
2015-08-11 18:56:13
阅读次数:
142
题意:给一块h*w广告板,然后给n个1*wi的广告条,广告条放的顺序是有限选择向上的,再优先选择左边的,对于每块广告条,输出它放的位置,如果放不下,输出-1
分析:很简单的单点更新max值的线段树,思路很好想,以广告板的每个高度建树,更新点的时候优先选择高度值小的点。
注意:比较容易出错的是 ,要注意h的范围啊1e9!!!,直接以这个高度建树肯定爆啊,这里注意到n是200000...
分类:
其他好文 时间:
2015-08-10 14:50:04
阅读次数:
114
hdu 2795 的传送门–>Problem Description
At the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible...
分类:
其他好文 时间:
2015-08-08 13:38:45
阅读次数:
141
Problem Description
At the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcements ...
分类:
其他好文 时间:
2015-08-08 12:05:48
阅读次数:
102