1165: 最少的需求 [贪心] 时间限制: 1 Sec 内存限制: 128 MB 提交: 12 解决: 4 状态 题目描述 小Q开了一家餐厅,最近生意非常火爆. 假设有N N 个预订信息,第i i 个预订信息有三个整数L i ,R i ,x i Li,Ri,xi ,表示预订了第L i Li 天到第R i Ri 天x i xi 个座位(一个座位对于一个椅子).由于椅子数目不够,现在小Q要购买一些椅子.请问他最少需要购买多少个椅子才可以满足所有的需求. PS:假设小Q一开始椅子数目为0 0…
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15564 Accepted Submission(s): 6405 Problem Description There is a pile of n wooden sticks. The length and weight of each stick a…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784 Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n grid. In this game a ships are placed on the grid. Each of the ships consists of bconsecutive cells. No cell can be part of two ships, however, the shi…