码迷,mamicode.com
首页 >  
搜索关键字:supermarket    ( 83个结果
UVA1316- Supermarket
点击打开链接 题意:有N个物品,每个物品在都有一个截止日期,如果在截止日期之前(包括截止日期)卖出将会获得相应的利润,卖出物品需要一个单位时间,问最多能获得多少利润? 思路:将利润从大到小排序,尽量在该物单位时间出售利润大的物品,这样就能使得从利润达到最大。 #include #include #include #include using namespace...
分类:其他好文   时间:2014-08-12 13:40:24    阅读次数:147
POJ1456Supermarket(贪心+优先队列)
Supermarket Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9103   Accepted: 3891 Description A supermarket has a set Prod of products on sale. It earns a pr...
分类:其他好文   时间:2014-08-12 00:45:03    阅读次数:213
poj 1456 Supermarket (贪心+并查集)
# include # include # include using namespace std; int fa[10010]; struct node { int p; int d; }; struct node a[10010]; bool cmp(node a1,node a2)//利润从大到小 { return a1.p>a2.p; } int find(int x) {...
分类:其他好文   时间:2014-08-03 10:16:25    阅读次数:208
83条   上一页 1 ... 7 8 9
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!