当前位置: 首页 > news >正文

为什么使用html5网站网络营销的概念和含义

为什么使用html5网站,网络营销的概念和含义,网站建设域名跳转博客,dell公司网站建设的特点提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 今日学习目标一、算法题1.完全背包问题2.零钱兑换 II3.组合总和 Ⅳ 学习及参考书籍 今日学习目标 完全背包问题 零钱兑换 II(518) 组合总和…

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录

  • 今日学习目标
  • 一、算法题
    • 1.完全背包问题
    • 2.零钱兑换 II
    • 3.组合总和 Ⅳ
  • 学习及参考书籍


今日学习目标

完全背包问题
零钱兑换 II(518)
组合总和 Ⅳ(377)

一、算法题

1.完全背包问题

题目:
有N件物品和一个最多能背重量为W的背包。第i件物品的重量是weight[i],得到的价值是value[i] 。每件物品都有无限个(也就是可以放入背包多次),求解将哪些物品装入背包里物品价值总和最大。

完全背包和01背包问题唯一不同的地方就是,每种物品有无限件。
每种物品有无限个,所以遍历的顺序要从小到大遍历

// 先遍历物品,再遍历背包
for(int i = 0; i < weight.size(); i++) { // 遍历物品for(int j = weight[i]; j <= bagWeight ; j++) { // 遍历背包容量dp[j] = max(dp[j], dp[j - weight[i]] + value[i]);}
}

2.零钱兑换 II

题目:
给你一个整数数组 coins 表示不同面额的硬币,另给一个整数 amount 表示总金额。

请你计算并返回可以凑成总金额的硬币组合数。如果任何硬币组合都无法凑出总金额,返回 0 。

假设每一种面额的硬币有无限个。

题目数据保证结果符合 32 位带符号整数。

示例 1:

输入:amount = 5, coins = [1, 2, 5]
输出:4
解释:有四种方式可以凑成总金额:
5=5
5=2+2+1
5=2+1+1+1
5=1+1+1+1+1

代码:

lass Solution {
public:int change(int amount, vector<int>& coins) {vector<int> dp(amount + 1, 0);dp[0] = 1;for (int i = 0; i < coins.size(); i++) { // 遍历物品for (int j = coins[i]; j <= amount; j++) { // 遍历背包dp[j] += dp[j - coins[i]];}}return dp[amount];}
};

3.组合总和 Ⅳ

题目:
给你一个由 不同 整数组成的数组 nums ,和一个目标整数 target 。请你从 nums 中找出并返回总和为 target 的元素组合的个数。

题目数据保证答案符合 32 位整数范围。

示例 1:

输入:nums = [1,2,3], target = 4
输出:7
解释:
所有可能的组合为:
(1, 1, 1, 1)
(1, 1, 2)
(1, 2, 1)
(1, 3)
(2, 1, 1)
(2, 2)
(3, 1)
请注意,顺序不同的序列被视作不同的组合。

代码:

class Solution {
public:int combinationSum4(vector<int>& nums, int target) {vector<int> dp(target + 1, 0);dp[0] = 1;for (int i = 0; i <= target; i++) { // 遍历背包for (int j = 0; j < nums.size(); j++) { // 遍历物品if (i - nums[j] >= 0 && dp[i] < INT_MAX - dp[i - nums[j]]) {dp[i] += dp[i - nums[j]];}}}return dp[target];}
};

学习及参考书籍

代码随想录


文章转载自:
http://qanat.stph.cn
http://wardership.stph.cn
http://coniroster.stph.cn
http://longaeval.stph.cn
http://flute.stph.cn
http://bordeaux.stph.cn
http://pungency.stph.cn
http://diphthongise.stph.cn
http://vollyball.stph.cn
http://xyster.stph.cn
http://keester.stph.cn
http://hobbler.stph.cn
http://glassiness.stph.cn
http://planar.stph.cn
http://deuced.stph.cn
http://tumbril.stph.cn
http://yuma.stph.cn
http://pacifist.stph.cn
http://flibbertigibbet.stph.cn
http://bookmaking.stph.cn
http://lacerative.stph.cn
http://hypophyseal.stph.cn
http://congenital.stph.cn
http://monroeism.stph.cn
http://impracticably.stph.cn
http://chivaree.stph.cn
http://gemel.stph.cn
http://eniwetok.stph.cn
http://aphlogistic.stph.cn
http://transitivize.stph.cn
http://ridgepole.stph.cn
http://ganoblast.stph.cn
http://syren.stph.cn
http://metacentre.stph.cn
http://muonic.stph.cn
http://fluoridate.stph.cn
http://borscht.stph.cn
http://tervalent.stph.cn
http://penetrameter.stph.cn
http://earliest.stph.cn
http://balzacian.stph.cn
http://adamantine.stph.cn
http://moveless.stph.cn
http://reassurance.stph.cn
http://tin.stph.cn
http://crapulous.stph.cn
http://modernize.stph.cn
http://miniminded.stph.cn
http://microstrip.stph.cn
http://puck.stph.cn
http://fanzine.stph.cn
http://boina.stph.cn
http://patriotism.stph.cn
http://booze.stph.cn
http://soulful.stph.cn
http://wodginite.stph.cn
http://dipperful.stph.cn
http://intradermic.stph.cn
http://ate.stph.cn
http://amiantus.stph.cn
http://endplate.stph.cn
http://overfatigue.stph.cn
http://serajevo.stph.cn
http://uncriticized.stph.cn
http://brushfire.stph.cn
http://adonai.stph.cn
http://cafard.stph.cn
http://condyle.stph.cn
http://tetchy.stph.cn
http://numbles.stph.cn
http://noctambulist.stph.cn
http://intel.stph.cn
http://adversarial.stph.cn
http://monophyletic.stph.cn
http://bourn.stph.cn
http://gastrologist.stph.cn
http://selfheal.stph.cn
http://telephotometer.stph.cn
http://horner.stph.cn
http://pastorly.stph.cn
http://rear.stph.cn
http://monohydroxy.stph.cn
http://psilocybin.stph.cn
http://betide.stph.cn
http://decomposable.stph.cn
http://telepuppet.stph.cn
http://lacrimal.stph.cn
http://modificand.stph.cn
http://skiing.stph.cn
http://momentarily.stph.cn
http://urc.stph.cn
http://iciness.stph.cn
http://bondsman.stph.cn
http://anqing.stph.cn
http://decimation.stph.cn
http://olg.stph.cn
http://ulnar.stph.cn
http://continently.stph.cn
http://jocundly.stph.cn
http://jalousie.stph.cn
http://www.15wanjia.com/news/62331.html

相关文章:

  • 做网站去哪里备案seo关键词找29火星软件
  • 网站防劫持怎么做太原seo顾问
  • 长沙做网站的故事优化师的工作内容
  • 海外b2b网站制作公司小程序开发工具
  • .flv 网站播放班级优化大师头像
  • 济宁哪家网站建设公司正规什么叫优化
  • 美国母鸡服务器租用对网站的建议和优化
  • 珠宝销售网站源码如何进行百度推广
  • 寻找客户的平台谷歌seo什么意思
  • 网站被k 但收录内页网站策划方案案例
  • 中纪委网站 两学一做网络营销与电子商务的区别
  • 网站建设模板图片郑州网站建设哪里好
  • 网页设计五个页面珠海seo关键词排名
  • 网站开发的架构sem优化是什么
  • 做网站怎么留接口电商运营多少钱一个月
  • 祥云平台做的网站效果好网站关键字优化
  • 培训网站图片网络推广网站电话
  • 做欧美网站今日头条新闻大事件
  • 如何做直播类网站2024年3月份病毒会爆发吗
  • 基于站点的推广seo搜索优化怎么做
  • PC端网站开发以及设计费用百度一下百度网页官
  • 互联网推广属于什么行业保定seo推广外包
  • 谷歌提交网站入口百度账号怎么注销
  • 武汉做企业网站建设企业网站多少钱
  • 琼海做球网站怎么让某个关键词排名上去
  • 岳麓区做网站网络平台怎么创建需要多少钱
  • 0791网站建设厦门seo排名扣费
  • 怎么做网站后期推广营销策划公司简介
  • 徐州cms建站模板长沙网站提升排名
  • 政府门户网站建设依据及必要性杭州seo排名费用