当前位置:网站首页>Dynamic planning, shopping list problem
Dynamic planning, shopping list problem
2022-07-25 10:15:00 【Wendianfei】
describe
Wang Qiang decided to use the year-end bonus for shopping , He divided the items he wanted to buy into two categories : Main parts and accessories , The attachment is subordinate to a main component , Here are some examples of main components and accessories :
| Main parts | The attachment |
| The computer | The printer , Scanner |
| Bookcase | The book |
| desk | Desk lamp , Stationery |
| Work chair | nothing |
If you want to buy items classified as accessories , You must buy the main part of the accessory first , And each item can only be purchased once .
Each main component can have 0 individual 、 1 Or 2 Attachments . Attachments no longer have their own attachments .
Wang Qiang found the price of each item ( All are 10 An integral multiple of one yuan ), And he only N Yuan budget . besides , He set an importance level for each item , Integers 1 ~ 5 Express . He hopes to spend no more than N Under the premise of yuan , Maximize your satisfaction .
Satisfaction refers to the sum of the product of the price and importance of each item purchased , Let's assume that ii The price of the item is v[i]v[i], The importance is w[i]w[i
边栏推荐
猜你喜欢

GCD详解

DHCP的配置(以华为eNSP为例)

VoxCeleb1 数据集下载
![[deployment of deep learning model] deploy the deep learning model using tensorflow serving + tornado](/img/62/78abf16bb6c66726c6e394c9fb4f81.png)
[deployment of deep learning model] deploy the deep learning model using tensorflow serving + tornado

@Import,Conditional和@ImportResourse注解

CentOs安装redis

Introduction to armv8 architecture

Probability theory and mathematical statistics 4 continuous random variables and probability distributions (Part 1)

mysql历史数据补充新数据
![[recommended collection] with these learning methods, I joined the world's top 500 - the](/img/95/e34473a1628521d4b07e56877fcff1.png)
[recommended collection] with these learning methods, I joined the world's top 500 - the "fantastic skills and extravagance" in the Internet age
随机推荐
Download and installation of QT 6.2
The economic basis of a hardware siege lion
oracle 解析同名xml 问题
安装 oh my zsh
Usage of string slicing
[necessary for growth] Why do I recommend you to write a blog? May you be what you want to be in years to come.
多线程——Callable接口,lambda
多线程——死锁和synchronized
数论---最大公约数最小公倍数
拷贝过来老的项目变成web项目
链表相关(设计链表及环链表问题)
[deployment of deep learning model] deploy the deep learning model using tensorflow serving + tornado
Nodejs初体验
字典树的使用
CentOS install redis
message from server: “Host ‘xxx.xxx.xxx.xxx‘ is not allowed to connect to this MySQL server“
Dataset 和 Dataloader数据加载
nodejs链接mysql报错:ER_NOT_SUPPORTED_AUTH_MODEError: ER_NOT_SUPPORTED_AUTH_MODE
vant问题记录
File upload function