PostersTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2061Accepted Submission(s): 455Problem DescriptionTed has a new house with a huge window. In this big summer, Ted decides to decorate the window with some posters to prevent the glare outside. Read More
posted @ 2012-01-31 20:15 Because Of You Views(598) Comments(0) Diggs(0) Edit
iterator lower_bound( const key_type &key ) 函数用法,返回一个迭代器,指向键值>= key的第一个元素。iterator upper_bound( const key_type &key ) 函数用法,返回一个迭代器,指向键值> key的第一个元素。 Read More
posted @ 2012-01-31 20:12 Because Of You Views(225) Comments(0) Diggs(0) Edit
View Code //树状数组 + 简单DP//同hdu 3450,dp的求和操作由树状数组来求执行#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn = 500010;const int mod = 1000000007;__int64 c[maxn],a[maxn],val[maxn],b[maxn];int tot;int lowbit(int x){ return x&-x;}void update(int x,__in Read More
posted @ 2012-01-31 19:53 Because Of You Views(434) Comments(0) Diggs(0) Edit
先用简单线段树记录当前线段的左右两端下来的线段编号再从上往下dp下来即可具体做法:先按高度升序排序,依次插入各条线段,每次先询问,后插入线段树只有一个域id【x】,表示当前区域被哪个线段完全覆盖View Code #include<cstdio>#include<cstring>#include<ctype.h>#include<algorithm>using namespace std;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int maxn = 111 Read More
posted @ 2012-01-31 19:47 Because Of You Views(229) Comments(0) Diggs(0) Edit
直接把hotel那题的代码拿过来,其他的都用stl来做了View Code #include<cstdio>#include<vector>#include<algorithm>using namespace std;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int maxn = 55555;int lsum[maxn<<2],rsum[maxn<<2],msum[maxn<<2],cover[maxn<<2];struc Read More
posted @ 2012-01-31 19:33 Because Of You Views(263) Comments(0) Diggs(0) Edit