码迷,mamicode.com
首页 >  
搜索关键字:supermarket    ( 83个结果
Codeforces Round #419 (Div. 2) E. Karen and Supermarket(树形DP)
题目链接:Codeforces Round #419 (Div. 2) E. Karen and Supermarket 题意: 有n件物品,每个物品有一个价格,和一个使用优惠券的价格,不过这个优惠券有一个限制,必须要在第x个使用后才可以使用。现在有m的钱,问最多能买多少个物品。 题解: 每个优惠券 ...
分类:其他好文   时间:2017-07-10 16:28:47    阅读次数:178
816E. Karen and Supermarket 树形DP
LINK 题意:给出n个商品,除第一个商品外,所有商品可以选择使用优惠券,但要求其前驱商品已被购买,问消费k以下能买几个不同的商品 思路:题意很明显就是树形DP。对于一个商品有三种选择,买且使用优惠券,买不使用优惠券,不买。当然如果直接暴力进行转移是$O(n^3)$的,但我们可以统计每个结点其子节点 ...
分类:其他好文   时间:2017-07-04 11:18:14    阅读次数:178
[POJ1456]Supermarket(贪心 + 优先队列 || 并查集)
传送门 1.贪心 + 优先队列 按照时间排序从前往后 很简单不多说 ——代码 1 #include <queue> 2 #include <cstdio> 3 #include <iostream> 4 #include <algorithm> 5 #define N 10001 6 7 int n ...
分类:其他好文   时间:2017-06-15 19:40:01    阅读次数:154
Codeforces 463A. Caisa and Sugar
Caisa is going to have a party and he needs to buy the ingredients for a big chocolate cake. For that he is going to the biggest supermarket in town. ...
分类:其他好文   时间:2017-05-19 22:10:24    阅读次数:251
HDU3579 线性同余方程(模板 余数不一定互质)
Hello Kiki Problem Description One day I was shopping in the supermarket. There was a cashier counting coins seriously when a little kid running and s ...
分类:其他好文   时间:2017-03-05 19:07:14    阅读次数:191
Hello Kiki(中国剩余定理——不互质的情况)
Hello Kiki Problem Description One day I was shopping in the supermarket. There was a cashier counting coins seriously when a little kid running and s ...
分类:其他好文   时间:2017-01-20 22:20:24    阅读次数:328
POJ1275 Cashier Employment[差分约束系统 || 单纯形法]
Cashier Employment Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7997 Accepted: 3054 Description A supermarket in Tehran is open 24 hours ...
分类:其他好文   时间:2016-12-17 22:20:48    阅读次数:163
Milk(sort+结构体)
Description Ignatius drinks milk everyday, now he is in the supermarket and he wants to choose a bottle of milk. There are many kinds of milk in the s ...
分类:其他好文   时间:2016-07-19 18:43:04    阅读次数:124
Supermarket---poj456(贪心并查集优化)
题目链接:http://poj.org/problem?id=1456 题意是现有n个物品,每个物品有一个保质期和一个利润,现在每天只能卖一个商品,问最大的利润是多少,商品如果过期了就不能卖了; 暴力的方法: #include <iostream> #include <cstdio> #includ ...
分类:其他好文   时间:2016-05-13 09:52:48    阅读次数:148
83条   上一页 1 ... 4 5 6 7 8 9 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!