Children of the Candy CornTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11215Accepted: 4841DescriptionThe cornfield maze is a popular Hallo...
分类:
其他好文 时间:
2015-08-18 10:11:17
阅读次数:
113
链接
题解链接:http://www.cygmasot.com/index.php/2015/08/16/hdu_5380
题意:
n C
一条数轴上有n+1个加油站,起点在0,终点在n。车的油箱容量为C
下面n个数字表示每个加油站距离起点的距离。
下面n+1行表示每个加油站买进和卖出一单位油的价格。油可以买也可以卖。
问开到终点的最小花费。
思路:
把油箱保持装满,然后维护一个...
分类:
其他好文 时间:
2015-08-16 16:41:51
阅读次数:
150
本文纯属原创,转载请注明出处。http://blog.csdn.net/zip_fan,谢谢。
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=5380。
Travel with candy
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (...
分类:
其他好文 时间:
2015-08-16 16:41:33
阅读次数:
269
DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-...
分类:
其他好文 时间:
2015-08-16 16:37:35
阅读次数:
112
题目链接:hdu 5380 Travel with candy
保持油箱一直处于满的状态,维护一个队列,记录当前C的油量中分别可以以多少价格退货,以及可以推货的量。每到一个位置,可以该商店的sell值更新队列中所有价格小于sell的(还没有卖)。用buy值更新队列中大于buy(卖掉了)。移动所消耗的油从价格最低的开始。
#include
#include
#include ...
分类:
其他好文 时间:
2015-08-15 11:56:37
阅读次数:
202
Candy Sharing GameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionA number of students sit in a circ...
分类:
其他好文 时间:
2015-08-14 13:14:22
阅读次数:
110
Candy Sharing Game
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3812 Accepted Submission(s): 2377
Problem Description
A number of stude...
分类:
其他好文 时间:
2015-08-10 18:12:23
阅读次数:
126
http://yichuanshen.de/blog/2010/11/13/flipping-elements-with-wpf/Have you already seen ForgottenTime’s new flip animation eye candy? If not, it’s abou...
非常卡时间,不能用set
而却糖果是不会重的,之前认为会重也一直超时
别忘了清空,不清空也会超时
#include
using namespace std;
typedef pair candy;
list s;
int main()
{
int n;
while( scanf("%d",&n) && n ){
s.clear();
wh...
分类:
其他好文 时间:
2015-08-03 10:11:54
阅读次数:
255
题目:
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must have at...
分类:
编程语言 时间:
2015-08-01 23:40:01
阅读次数:
221