摘要: problem给你一堆宽度为1,高度不同的矩形条。问你能框出一个最大矩形面积为多少。solution如果矩形高度递增,那么答案为每个元素最多能向右扩展多少。如果矩形高度比上一个小,那么该矩形与之前的矩形构成新矩形时,之前矩形比他高的地方就用不到了,同时之前比... 阅读全文
posted @ 2018-08-08 18:59 gwj1139177410 阅读(120) 评论(0) 推荐(0) 编辑
摘要: problem维护一个整数序列的编辑器,支持5种操作,操作数#include#includeusing namespace std;const int maxn = 1e6+10;int f[maxn];int main(){ int T; while(s... 阅读全文
posted @ 2018-08-08 17:53 gwj1139177410 阅读(226) 评论(0) 推荐(0) 编辑
摘要: problem在一条直线上有n个坑,要种k棵树。不能在相邻两个坑种树。已知在每个坑种树会有一个获利,求最大获利。n#includeusing namespace std;const int maxn = 5e5+10;struct node{ int id, v... 阅读全文
posted @ 2018-08-08 08:13 gwj1139177410 阅读(181) 评论(0) 推荐(0) 编辑
选择