[动态规划]3.3.2 Shopping Offers

【USACO题库】3.3.2 Shopping Offers商店购物 题目描述 在商店中,每一种商品都有一个价格(用整数表示)。例如,一朵花的价格是 2 zorkmids (z),而一个花瓶的价格是 5z 。为了吸引更多的顾客,商店举行了促销活动。 促销活动把一个或多个商品组合起来降价销售,例如: 三朵花的价格是 5z 而不是 6z, 两个花瓶和一朵花的价格是 10z 而不是 12z。 编写一个程序,计算顾客购买一定商品的花费,尽量利用优惠使花费最 阅读详情

Shopping Offers

商店购物

IOI'95

译 by Felicia Crazy

在商店中,每一种商品都有一个价格(用整数表示)。例如,一朵花的价格是 2 zorkmids (z),而一个花瓶的价格是 5z 。为了吸引更多的顾客,商店举行了促销活动。

促销活动把一个或多个商品组合起来降价销售,例如:

  • 三朵花的价格是 5z 而不是 6z,
  • 两个花瓶和一朵花的价格是 10z 而不是 12z。

编写一个程序,计算顾客购买一定商品的花费,尽量利用优惠使花费最少。尽管有时候添加其他商品可以获得更少的花费,但是你不能这么做。

对于上面的商品信息,购买三朵花和两个花瓶的最少花费是:以优惠价购买两个花瓶和一朵花(10z),以原价购买两朵花(4z)。

PROGRAM NAME: shopping

INPUT FORMAT

输入文件包括一些商店提供的优惠信息,接着是购物清单。

第一行
优惠商品的种类数(0 <= s <= 99)。
第二行..第s+1 行
每一行都用几个整数来表示一种优惠方式。第一个整数 n (1 <= n <= 5),表示这种优惠方式由 n 种商品组成。后面 n 对整数 c 和 k 表示 k (1 <= k <= 5)个编号为 c (1 <= c <= 999)的商品共同构成这种优惠,最后的整数 p 表示这种优惠的优惠价(1 <= p <= 9999)。优惠价总是比原价低。
第 s+2 行
这一行有一个整数 b (0 <= b <= 5),表示需要购买 b 种不同的商品。
第 s+3 行..第 s+b+2 行
这 b 行中的每一行包括三个整数:c ,k ,和 p 。c 表示唯一的商品编号(1 <= c <= 999),k 表示需要购买的 c 商品的数量(1 <= k <= 5)。p 表示 c 商品的原价(1 <= p <= 999)。最多购买 5*5=25 个商品。

SAMPLE INPUT (file shopping.in)

2
1 7 3 5
2 7 1 8 2 10
2
7 3 2
8 2 5

OUTPUT FORMAT

只有一行,输出一个整数:购买这些物品的最低价格。

SAMPLE OUTPUT (file shopping.out)

14
 
 
此题解法有很多种.在此介绍动态规划解法.
假设要买s1..s5种物品num[s1]..num[s5]件
用f[a1,a2,a3,a4,a5]表示买a1件s1..a5件s5所用的最小消费
 
预处理将只买一件也作为一种优惠方式
 
那么我们可以枚举j表示第j种购买方式。
对于f[a1,a2,a3,a4,a5]必然是由之前的一个状态再加上第j种优惠方式购买而得到。
方程式类似于背包方程
f[0,0,0,0,0]:=0;
输出 f[num[s1],...,num[s5]]
 
type rr=record
     num:array[0..2000]of longint;
     cost:longint;
end;

var i,j,k,n,p,k1,kk,i1,i2,i3,i4,i5:longint;
    cheap:array[0..1000]of rr;
    b:array[0..10]of longint;
    need,price:array[0..2000]of longint;
    f:array[0..10,0..10,0..10,0..10,0..10]of longint;
    flag:boolean;

function min(a,b:longint):longint;
begin
   if a<b then exit(a) else exit(b);
end;

begin
    fillchar(cheap,sizeof(cheap),0);
    fillchar(f,sizeof(f),$7f);
    fillchar(b,sizeof(b),0);
    readln(n);
    for i:=1 to n do
    begin
        read(k1);
        for j:=1 to k1 do
        read(kk,cheap[i].num[kk]);
        read(cheap[i].cost);
    end;
    readln(p);
    for i:=1 to p do
    begin
    readln(b[i],need[b[i]],price[b[i]]);
    cheap[i+n].num[b[i]]:=1;
    cheap[i+n].cost:=price[b[i]];
    end;
    f[0,0,0,0,0]:=0;
    for i1:=0 to need[b[1]] do
    for i2:=0 to need[b[2]] do
    for i3:=0 to need[b[3]] do
    for i4:=0 to need[b[4]] do
    for i5:=0 to need[b[5]] do
    begin
        for j:=1 to n+p do
        begin
          flag:=false;
          if (i1>=cheap[j].num[b[1]])and(i2>=cheap[j].num[b[2]])and(i3>=cheap[j].num[b[3]])and(i4>=cheap[j].num[b[4]])and(i5>=cheap[j].num[b[5]]) then    flag:=true;
          if flag then
          begin
            f[i1,i2,i3,i4,i5]:=min(f[i1,i2,i3,i4,i5],
            f[i1-cheap[j].num[b[1]],i2-cheap[j].num[b[2]],i3-cheap[j].num[b[3]],i4-cheap[j].num[b[4]],i5-cheap[j].num[b[5]]]+cheap[j].cost);
          end;
        end;
   end;
   writeln(f[need[b[1]],need[b[2]],need[b[3]],need[b[4]],need[b[5]]]);
    readln;readln;
end.

 
 
 
商店购物 题解 仗剑天涯,从我的摘要开始(滑稽 阅读详情

相关推荐

P2732 [USACO3.3]商店购物 Shopping Offers

题目传送门:P2732 [USACO3.3]商店购物 Shopping Offers 这道题乍一看,压根看不懂,再看,看懂题了,第三眼,发现是动规,冥思苦想了半天想出来一个特别暴力的办法 首先我瞄准了小数据,最多只会有 5 种,所以我决定直接五维 dp f[i][j][k][l][m]f[i][j][k][l][m]f[i][j][k][l][m] 表示在第一个物品有 iii 个,表示在第二个物品有 jjj 个,表示在第三个物品有 kkk 个,表示在第四个物品有 lll 个,表示在第五个物品有 mmm 个,

m0_59024001的博客 433

ShoppingOffers

problem In LeetCode Store, there are some kinds of items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or more different kinds of items w...

二进制的子苏 332

动态规划算法最少费用问题的C++代码

商店中每种商品都有标价。例如,一朵花的价格是2 元。一个花瓶的价格是5 元。为了吸引顾客,商店提供了一组优惠商品价。优惠商品是把一种或多种商品分成一组,并降价销售。例如,3 朵花的价格不是6 元而是5 元。2 个花瓶加1 朵花的优惠价是10 元。试设计一个算法,计算出某一顾客所购商品应付的最少费用。

东华大学2020考研计算机复试准备上机题解析答案_进阶篇(61-95)

文章目录前言61 螺旋方阵 前言 提交代码: 选择C++编程语言,因为有的时候会用到C++的一些方便的头文件什么的,还有我编写代码是有一部分是纯C的,因为做题来讲C的scanf和printf很方便。 发布文章安排: 我会抽时间发文章的,看时间安排了,现在时间有点紧吧。马上过年了。过完年要开始准备准备其他东西了 解题解法质量: 关于我的解法和代码的精简程度,我是以当时做题的心态来解题的,由于当时急着...

zhou_hao_ran的博客 7804

GAN管CGH40010F设计宽带Doherty功放:如何用ADS搞定输入匹配、合路网络与功分器?

本文详细介绍了基于CGH40010F GaN晶体管的宽带Doherty功放设计流程,重点讲解在ADS平台中实现输入匹配网络、合路网络与功分器的关键技术。通过寄生参数补偿、渐变微带线设计和复合补偿结构等方法,解决了宽带化设计中的核心挑战,最终实现1.7-2.6GHz频段内72%的峰值效率和52%的回退效率。

weixin_42614269的博客 473

Anthropic三件套重构AI工作流:Claude Code、Design与桌面宠物实战指南

AI协作已从单点工具迈入系统化工作流阶段。理解AI作为‘协作者’而非‘执行器’的本质,是提升工程效率的关键前提;其核心在于对任务调度、自适应推理与人机交互边界的重新定义。Claude Code的xhigh effort机制体现了分层推理的工程智慧,Claude Design以HTML为原生设计语言实现设计-代码一体化,而桌面宠物则将抽象的token消耗具象为可感知的硬件反馈。这些能力共同指向一个趋势:AI工作流正从prompt调参走向契约式委派、从界面割裂走向跨模态统一。本文结合Opus 4.7最新实践,解

a4512138的专栏 484

动态规划-638-Shopping Offers

Description: In LeetCode Store, there are some kinds of items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or more different kinds of i...

fighting! 496

2023最新版kali安装教程

2023最新版kali安装教程 打开kali官网(https://www.kali.org/),下载kali镜像

qq_46346209的博客 2万+

poj 1170 Shopping Offers 动态规划绝对经典题目

题目为POJ 1170题目链接:http://poj.org/problem?id=1170 #include #include #include using namespace std; const int M=6; const int inf=20000;

凌风 2206

学Simulink——基于直流电机的建模与控制场景实例:直流电机带负载突变时的动态响应仿真

在实际应用中,直流电机经常需要应对各种工作条件的变化,例如负载突变。了解电机在这种情况下的动态响应特性对于确保系统的稳定性和可靠性至关重要。通过仿真分析,可以预测电机在不同负载条件下的表现,并优化控制系统的设计。本文将详细介绍如何使用来构建一个直流电机带负载突变时的动态响应仿真模型,并通过仿真展示其应用效果。本文介绍了如何使用构建一个直流电机带负载突变时的动态响应仿真模型,并通过仿真展示了其应用效果。

xiaoheshang_123的博客 114

杰理JL701N内置flash录音配置教程

本文详细介绍了内置Flash录音功能的配置方法。主要内容包括:1) 基础模式配置(开启音乐/录音模式、Flash录音宏定义);2) 录音参数设置(格式基准值、存储区域定义、容量配置);3) MP3编码特殊处理;4) 下载时的Flash格式化操作;5) 录音开关和播放接口的使用说明。配置过程涉及多个关键文件的修改,并强调存储容量的精确分配。

qq_42014563的博客 597

usaco3.3.2 Shopping Offers

一 原题 Shopping Offers IOI'95 In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zorkmids (z) and the price of a vase is 5z. In order to attract m

max_kibble的博客 354

第十六章:载板制造工艺大全

本文详细介绍了IC载板制造的完整工艺流程,主要包括开料、钻孔、孔金属化、图形形成、层压、表面处理、成型和电测8大工序。每个工序都列出了关键参数和质量控制要点,如开料尺寸精度±0.1mm、激光钻孔孔径50-150μm、孔金属化铜厚20-30μm、图形形成线宽15μm±2μm等。文中还特别说明了MSAP工艺和沉金等特殊工艺的详细流程,以及成型精度和电测标准等关键指标。全文通过流程图和参数表格直观展示了IC载板制造的核心工艺和质量要求。

Open 184

Shopping Offers

1.解析 题目大意,给定每个商品的价值和优惠券(优惠券可以重复使用),求解所购买商品最少花多少钱。 2.分析 我最初看到这道题的时候,求最值,以为是DP,但在设计的过程中,发现有个问题,就是所取到的值并不是局部的最优解,因为不单要考虑优惠券,而且还要考虑无法使用优惠券的那部分的钱,所以不是DP。参考@Grandyang博主的思路,发现其实采用深度优先检索是最简便的,利用一个临时变量...

Czyaun的博客 301

【WRF安装】WRF环境配置移植详细说明

【WRF安装】WRF环境配置移植详细说明

WW、forever的博客 819

Flutter 自适应布局一套代码适配手机和平板(12)

通过LayoutBuilder组件动态检测屏幕尺寸,根据宽度阈值(600px)选择不同布局方式。在小屏幕上显示单页联系人分组,大屏幕采用侧边栏+详情面板的并排布局。核心实现包括:1)使用LayoutBuilder获取父容器约束条件;2)定义大屏幕和小屏幕的布局断点;3)构建响应式界面组件,其中大屏幕布局采用Row横向排列固定宽度侧边栏和弹性宽度的详情区域。这种方案可确保应用在不同设备上都能提供最佳显示效果。

hello.reader 316

Week 9 - 638.Shopping Offers - Medium

638.Shopping Offers - Medium In LeetCode Store, there are some kinds of items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or more d...

bagc47052的博客 161

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

【POJ 1170】 Shopping Offers [动态规划 状态压缩 背包][离散化]

POJ - 1170 Shopping Offers 放假打题 sufu 看完题我是懵比的 这.... emmmmm 瓜想了半个小时之后我选择狗带 然后点开链接 状压+dp!!!!哦!!!!!!巧妙!!!! 就先把目标状态还有各个优惠的状态处理好 然后就是一个完全背包处理用优惠 1 #include<bits/stdc++.h> 2 using namespa...

weixin_30781631的博客 159

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

LeetCode算法学习日志-638 Shopping Offers

LeetCode 638 Shopping Offers 题目原文 In LeetCode Store, there are some kinds of items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or m

Zarlove的博客 1884

[USACO3.3.2]Shopping Offers

Shopping Offers IOI'95 In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zorkmids (z) and the price of a vase is 5z. In order to attract more cust

qq_37665716的博客 299

USACO 3.3.2 Shopping Offers解题报告

写在前面:因为之前没写的C++的USACO Training的解题报告太多……所以就不写了,要是想要代码可以联系我:xiedong_1993@foxmail.com 这题就是传说中的五维背包,其实写起来难度不大。但是我写的时候可以说是遇到了重重困难。因为我对C++的掌握还不如Pascal,所以很多东西写的不是很熟。这题有一个很大的问题就在于,最后有用的只有五种物品,但是物品的编号却又很...

diekang6987的博客 272

Shopping Offers POJ - 1170

http://poj.org/problem?id=1170 将每一种交易当作一件物品 每件物品有无数件 问题就转换为完全背包问题 (000)(000)(000)(000)(000) 最多5种商品 每种商品用一个八进制数表示其数量 总的状态不超过2^15 以此作为背包容量 而每次交易即每种物品的重量也是对每种商品分开算 #include <cstdio> #include...

sunyutian1998的博客 267

LeetCode Weekly Contest 40(3) - Shopping Offers

638. Shopping Offers Difficulty: Medium In LeetCode Store, there are some kinds of items to sell. Each item has a price.However, there are some special offers, and a special offer consists of one or mo

WordPPT哥的博客 1106

638. Shopping Offers

In LeetCode Store, there are some kinds of items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or more different kinds of items with a sal...

Lin 的博客 241
上一篇: [最短路] 3.2.6 Sweet Butter
下一篇: [动态规划]5.3.4 Big Barn
UtralK
博客等级 码龄14年 3粉丝 40原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值