A new web-design studio, called SMART (Simply Masters of ART), employs two people. The first one is a web-designer and an executive director at the same time. The second one is a programmer. The director is so a nimble guy that the studio has already…
Language: Default The lazy programmer Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 1566   Accepted: 386 Description A new web-design studio, called SMART (Simply Masters of ART), employs two people. The first one is a web-designer and…
The lazy programmer Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 2785   Accepted: 703 Description A new web-design studio, called SMART (Simply Masters of ART), employs two people. The first one is a web-designer and an executive dire…
来源poj2970 A new web-design studio, called SMART (Simply Masters of ART), employs two people. The first one is a web-designer and an executive director at the same time. The second one is a programmer. The director is so a nimble guy that the studio h…
Description Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length Li (1 ≤ Li ≤ 50,000) units. He then purchases a s…
Luogu 1090 合并果子(贪心,优先队列,STL运用) Description 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆.多多决定把所有的果子合成一堆. 每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和.可以看出,所有的果子经过n-1次合并之后,就只剩下一堆了.多多在合并果子时总共消耗的体力等于每次合并所耗体力之和. 因为还要花大力气把这些果子搬回家,所以多多在合并果子时要尽可能地节省体力.假定每个果子重量都为1,并且已知果子…
Stripies Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 21506   Accepted: 9478 Description Our chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, bu…
「BZOJ1528」[POI2005] sam – Toy Cars Description Jasio 是一个三岁的小男孩,他最喜欢玩玩具了,他有n 个不同的玩具,它们都被放在了很高的架子上所以Jasio 拿不到它们. 为了让他的房间有足够的空间,在任何时刻地板上都不会有超过k 个玩具. Jasio 在地板上玩玩具. Jasio’的妈妈则在房间里陪他的儿子. 当Jasio 想玩地板上的其他玩具时,他会自己去拿,如果他想玩的玩具在架子上,他的妈妈则会帮他去拿,当她拿玩具的时候,顺便也会将一个地板…
直方图是由在公共基线处对齐的一系列矩形组成的多边形. 矩形具有相等的宽度,但可以具有不同的高度. 例如,图例左侧显示了由高度为2,1,4,5,1,3,3的矩形组成的直方图,矩形的宽度都为1: 通常,直方图用于表示离散分布,例如,文本中字符的频率. 现在,请你计算在公共基线处对齐的直方图中最大矩形的面积. 图例右图显示了所描绘直方图的最大对齐矩形. 输入格式 输入包含几个测试用例. 每个测试用例占据一行,用以描述一个直方图,并以整数n开始,表示组成直方图的矩形数目. 然后跟随n个整数h1,…,hn…
A B /* Huyyt */ #include <bits/stdc++.h> #define mem(a,b) memset(a,b,sizeof(a)) #define mkp(a,b) make_pair(a,b) #define pb push_back ][] = {{, }, {, }, {, -}, { -, }, {, }, {, -}, { -, -}, { -, }}; using namespace std; typedef long long ll; inline v…