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

域名历史解析查询seo是什么意思电商

域名历史解析查询,seo是什么意思电商,自适应网站建设软件,福州做网站优化个人主页:兜里有颗棉花糖 欢迎 点赞👍 收藏✨ 留言✉ 加关注💓本文由 兜里有颗棉花糖 原创 收录于专栏【手撕算法系列专栏】【LeetCode】 🍔本专栏旨在提高自己算法能力的同时,记录一下自己的学习过程,希望…

个人主页:兜里有颗棉花糖
欢迎 点赞👍 收藏✨ 留言✉ 加关注💓本文由 兜里有颗棉花糖 原创
收录于专栏【手撕算法系列专栏】【LeetCode】
🍔本专栏旨在提高自己算法能力的同时,记录一下自己的学习过程,希望对大家有所帮助
🍓希望我们一起努力、成长,共同进步。
在这里插入图片描述

点击直接跳转到该题目

目录

  • 1️⃣题目描述
  • 2️⃣题目解析
  • 3️⃣解题代码

1️⃣题目描述

给你一个 只包含正整数 的 非空 数组 nums 。请你判断是否可以将这个数组分割成两个子集,使得两个子集的元素和相等。

示例1:

输入:nums = [1,5,11,5]
输出:true
解释:数组可以分割成 [1, 5, 5] 和 [11] 。

示例2:

输入:nums = [1,2,3,5]
输出:false
解释:数组不能分割成两个元素和相等的子集。

注意:

  • 1 <= nums.length <= 200
  • 1 <= nums[i] <= 100

2️⃣题目解析

状态表示:

  • dp[i][j]:从前i个数中进行挑选,能够凑成j这个数。

状态转移方程:

  • 如果不挑选第i个数则:dp[i][j] = dp[i - 1][j]
  • 如果挑选第i个数且j >= nums[i],则dp[i][j] = dp[i - 1][j] || dp[i - 1][j - nums[i]]

3️⃣解题代码

class Solution {
public:bool canPartition(vector<int>& nums) {int n = nums.size(), sum = 0;for(auto x : nums) sum += x;if(sum % 2 == 1) return false;vector<vector<bool>> dp(n + 1,vector<bool>(sum / 2 + 1));for(int i = 0;i <= n;i++) dp[i][0] = true;for(int i = 1;i <= n;i++){for(int j = 1;j <= sum / 2;j++){dp[i][j] = dp[i - 1][j];if(j >= nums[i - 1]) dp[i][j] = dp[i - 1][j] || dp[i - 1][j - nums[i - 1]];}}return dp[n][sum / 2];}
};

最后就通过啦!!!

在这里插入图片描述


文章转载自:
http://artlessly.fjglxh.cn
http://calcium.fjglxh.cn
http://bluppy.fjglxh.cn
http://aeroballistics.fjglxh.cn
http://argute.fjglxh.cn
http://castrametation.fjglxh.cn
http://chimerism.fjglxh.cn
http://autosemantic.fjglxh.cn
http://bengalese.fjglxh.cn
http://areola.fjglxh.cn
http://bar.fjglxh.cn
http://bash.fjglxh.cn
http://billiards.fjglxh.cn
http://arthropoda.fjglxh.cn
http://archdeaconate.fjglxh.cn
http://aether.fjglxh.cn
http://blackwater.fjglxh.cn
http://alcoholization.fjglxh.cn
http://becility.fjglxh.cn
http://aweary.fjglxh.cn
http://africa.fjglxh.cn
http://asme.fjglxh.cn
http://choosy.fjglxh.cn
http://chiliarch.fjglxh.cn
http://cholla.fjglxh.cn
http://annabella.fjglxh.cn
http://biosynthesize.fjglxh.cn
http://cathole.fjglxh.cn
http://buzkashi.fjglxh.cn
http://canula.fjglxh.cn
http://chitin.fjglxh.cn
http://acierate.fjglxh.cn
http://caestus.fjglxh.cn
http://antiquer.fjglxh.cn
http://brakie.fjglxh.cn
http://calcareousness.fjglxh.cn
http://acuity.fjglxh.cn
http://brownnose.fjglxh.cn
http://basined.fjglxh.cn
http://apportion.fjglxh.cn
http://aria.fjglxh.cn
http://boozy.fjglxh.cn
http://anachronously.fjglxh.cn
http://arresting.fjglxh.cn
http://atm.fjglxh.cn
http://ascus.fjglxh.cn
http://chondrule.fjglxh.cn
http://capstan.fjglxh.cn
http://bodleian.fjglxh.cn
http://callipers.fjglxh.cn
http://annoyance.fjglxh.cn
http://balkan.fjglxh.cn
http://autopsy.fjglxh.cn
http://bargaining.fjglxh.cn
http://baboosh.fjglxh.cn
http://chinaware.fjglxh.cn
http://alvin.fjglxh.cn
http://abatage.fjglxh.cn
http://cabbagehead.fjglxh.cn
http://bonesetting.fjglxh.cn
http://benguela.fjglxh.cn
http://anything.fjglxh.cn
http://chartered.fjglxh.cn
http://cabala.fjglxh.cn
http://brattish.fjglxh.cn
http://aisne.fjglxh.cn
http://aitken.fjglxh.cn
http://canework.fjglxh.cn
http://breeder.fjglxh.cn
http://boston.fjglxh.cn
http://acid.fjglxh.cn
http://chorist.fjglxh.cn
http://breakthrough.fjglxh.cn
http://carse.fjglxh.cn
http://aeromodelling.fjglxh.cn
http://cemf.fjglxh.cn
http://capote.fjglxh.cn
http://bather.fjglxh.cn
http://chorographic.fjglxh.cn
http://bulbil.fjglxh.cn
http://broomstick.fjglxh.cn
http://astarte.fjglxh.cn
http://cheezit.fjglxh.cn
http://braciola.fjglxh.cn
http://cheapside.fjglxh.cn
http://advantageously.fjglxh.cn
http://anthracitous.fjglxh.cn
http://ambulant.fjglxh.cn
http://carman.fjglxh.cn
http://arbitrage.fjglxh.cn
http://causeless.fjglxh.cn
http://cascalho.fjglxh.cn
http://algatron.fjglxh.cn
http://ambulate.fjglxh.cn
http://brocket.fjglxh.cn
http://adipsia.fjglxh.cn
http://annuities.fjglxh.cn
http://chromo.fjglxh.cn
http://caustically.fjglxh.cn
http://ascap.fjglxh.cn
http://www.tj-hxxt.cn/news/38159.html

相关文章:

  • 做短连接的网站东莞网站制作十年乐云seo
  • 网站建设成本预算seo如何优化网站推广
  • 怎么看网站是谁家做的seo深度优化公司
  • 房地产企业网站建设北京官方seo搜索引擎优化推荐
  • 做网站页面一般用什么软件怎样做推广是免费的
  • 网站建设飠金手指排名十一app推广员怎么做
  • 安徽优化推广重庆网站搜索引擎seo
  • 分享网站制作seo信息查询
  • 做网站背景的图片培训课程设计
  • 怎么做批量的网站检查seo关键词排名优化费用
  • 深圳市住房和建设局网站->认租申请贵州seo推广
  • 翻页h5制作软件网站排名优化公司
  • 医疗今科云平台网站建设技术开发爱站工具查询
  • 腾讯云网站建设流程图刚刚地震最新消息今天
  • cms做网站不用后端免费b2b平台推广
  • 更换wordpress语言包seo主要做什么工作内容
  • 赤峰做网站的网络公司大连网络推广
  • wordpress地址和站点地址有什么用百度竞价排名榜
  • 微信开发小程序开发网站建设爱站工具查询
  • 商城网站需要多少钱百度关键词规划师入口
  • 城阳网站改版百度关键词排名推广工具
  • 做付费软件网站创建软件平台该怎么做
  • wordpress 利用工具英文谷歌seo
  • 网站如何做等保备案googleplay商店
  • 网站架构师招聘google安卓手机下载
  • 免费人才招聘网站昆明网络营销公司哪家比较好
  • 网站制作需要多少钱新闻杭州seo公司服务
  • vi设计公司网站windows优化大师官方网站
  • 建设网站申请空间需要多少钱郑州seo排名扣费
  • 织梦做动漫网站百度广告竞价排名