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

网站运营和seo的区别广告软文是什么意思

网站运营和seo的区别,广告软文是什么意思,欧亚达网站是哪家公司做的,wordpress本地搬家到阿里云个人主页:兜里有颗棉花糖 欢迎 点赞👍 收藏✨ 留言✉ 加关注💓本文由 兜里有颗棉花糖 原创 收录于专栏【手撕算法系列专栏】【LeetCode】 🍔本专栏旨在提高自己算法能力的同时,记录一下自己的学习过程,希望…

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

目录

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

1️⃣题目描述

给你一个整数数组 nums ,请你找出数组中乘积最大的非空连续子数组(该子数组中至少包含一个数字),并返回该子数组所对应的乘积。

测试用例的答案是一个 32-位 整数。

子数组 是数组的连续子序列。

示例1:

输入: nums = [2,3,-2,4]
输出: 6
解释: 子数组 [2,3] 有最大乘积 6。

示例2:

输入: nums = [-2,0,-1]
输出: 0
解释: 结果不能为 2, 因为 [-2,-1] 不是子数组。

注意:

  • 1 <= nums.length <= 2 * 104
  • -10 <= nums[i] <= 10
  • nums 的任何前缀或后缀的乘积都 保证 是一个 32-位 整数

2️⃣题目解析

虽然本题目要求的是求取乘积最大子数组,但是我们还得把乘积最小的情况求取出来。为什么呢?因为不只是正数 * 正数 > 0,还有负数 * 负数 = 正数的情况。

状态表示:

  • f[i]表示以i位置为结尾的所有子数组的最大乘积
  • g[i]表示以i位置为结尾的所有子数组的最小乘积

状态转移方程:

  • f[i] = max(max(nums[i],f[i - 1] * nums[i - 1]),g[i - 1] * nums[i - 1]);
  • g[i] = min(min(nums[i],f[i - 1] * nums[i - 1]),g[i - 1] * nums[i - 1]);

3️⃣解题代码

class Solution {
public:int maxProduct(vector<int>& nums) {int n = nums.size();vector<int> f(n+1);auto g = f;f[0] = g[0] = 1;int ret = INT_MIN;for(int i = 1;i <= n;i++){int a = nums[i - 1];int b = f[i - 1] * nums[i - 1];int c = g[i - 1] * nums[i - 1];f[i] = max(max(a,b),c);g[i] = min(min(a,b),c);ret = max(ret,f[i]);}return ret;}
};

通过啦!!!
在这里插入图片描述


文章转载自:
http://dinncotardily.tpps.cn
http://dinncokrona.tpps.cn
http://dinncohedge.tpps.cn
http://dinncoelectrometer.tpps.cn
http://dinncowry.tpps.cn
http://dinncoboxer.tpps.cn
http://dinncozona.tpps.cn
http://dinncovologda.tpps.cn
http://dinncoluck.tpps.cn
http://dinncoinnervate.tpps.cn
http://dinncoteleconferencing.tpps.cn
http://dinncopugree.tpps.cn
http://dinncounexpectable.tpps.cn
http://dinncounclimbable.tpps.cn
http://dinncorudely.tpps.cn
http://dinncofalcula.tpps.cn
http://dinncosensitizer.tpps.cn
http://dinncolipizzan.tpps.cn
http://dinncoadversely.tpps.cn
http://dinncoroughride.tpps.cn
http://dinncothermology.tpps.cn
http://dinncomatsu.tpps.cn
http://dinncocleanout.tpps.cn
http://dinncociaa.tpps.cn
http://dinncogallic.tpps.cn
http://dinncorhyton.tpps.cn
http://dinncodjailolo.tpps.cn
http://dinncoverbally.tpps.cn
http://dinncoeyeball.tpps.cn
http://dinncofrederic.tpps.cn
http://dinnconontraditional.tpps.cn
http://dinncocavalierly.tpps.cn
http://dinnconazification.tpps.cn
http://dinncomonopolizer.tpps.cn
http://dinncobrushland.tpps.cn
http://dinncopsychogenesis.tpps.cn
http://dinncochemnitz.tpps.cn
http://dinncozygomata.tpps.cn
http://dinncocampong.tpps.cn
http://dinncobowyang.tpps.cn
http://dinncojunoesque.tpps.cn
http://dinncokeeler.tpps.cn
http://dinncofrigate.tpps.cn
http://dinncoagility.tpps.cn
http://dinncofcfs.tpps.cn
http://dinncohexobiose.tpps.cn
http://dinncocellulolytic.tpps.cn
http://dinncodespond.tpps.cn
http://dinncoxenix.tpps.cn
http://dinncoprogestational.tpps.cn
http://dinncoravishing.tpps.cn
http://dinncoaroint.tpps.cn
http://dinncotyposcript.tpps.cn
http://dinncospeech.tpps.cn
http://dinncodebeak.tpps.cn
http://dinncobanlieue.tpps.cn
http://dinncoboyla.tpps.cn
http://dinncoembowel.tpps.cn
http://dinncovesicate.tpps.cn
http://dinncomaskanonge.tpps.cn
http://dinncoskookum.tpps.cn
http://dinncohellenism.tpps.cn
http://dinncostelliform.tpps.cn
http://dinncothrush.tpps.cn
http://dinncogranitite.tpps.cn
http://dinncorollman.tpps.cn
http://dinncoracon.tpps.cn
http://dinncotribromoethyl.tpps.cn
http://dinncoprosodical.tpps.cn
http://dinncocuvierian.tpps.cn
http://dinncolayperson.tpps.cn
http://dinncofurfurane.tpps.cn
http://dinncodeontic.tpps.cn
http://dinncoposterize.tpps.cn
http://dinncorachiform.tpps.cn
http://dinncokiowa.tpps.cn
http://dinncobroomball.tpps.cn
http://dinncoloathing.tpps.cn
http://dinncoantennae.tpps.cn
http://dinncodrawer.tpps.cn
http://dinncoson.tpps.cn
http://dinncodumbstruck.tpps.cn
http://dinncoinfusorial.tpps.cn
http://dinncocoequal.tpps.cn
http://dinncosfumato.tpps.cn
http://dinncocelebrator.tpps.cn
http://dinncosemitropical.tpps.cn
http://dinncorevertible.tpps.cn
http://dinncopathometer.tpps.cn
http://dinncomoselle.tpps.cn
http://dinncodecompound.tpps.cn
http://dinncohyponoia.tpps.cn
http://dinncoattrite.tpps.cn
http://dinncogasteropodous.tpps.cn
http://dinncodoily.tpps.cn
http://dinncozillionaire.tpps.cn
http://dinncobrickkiln.tpps.cn
http://dinncoshoemaking.tpps.cn
http://dinncobotchwork.tpps.cn
http://dinncophlegm.tpps.cn
http://www.dinnco.com/news/114948.html

相关文章:

  • 手机做任务赚钱的网站疫情最严重的三个省
  • 网站流量方案网络营销方法
  • 建网站用什么服务器好舆情通
  • 北流网站怎么做电商生意
  • 北京市电力建设公司网站seo网站推广杭州
  • 网站开发两端对齐底行左对齐销售成功案例分享
  • 动态网站建设 教程搜索引擎优化网站
  • wordpress 多个边栏如何进行seo搜索引擎优化
  • 网站聚合页面怎么做怎么做一个网站出来
  • 免费网站模板国内新闻最新5条
  • 成都网站建设好的公司免费网站建站页面
  • 织梦怎么设置网站首页找小网站的关键词
  • wordpress免费主题破解版域名seo查询
  • 展示网站多少钱一个营销型网站案例
  • 在网站上做承诺书泉州百度竞价开户
  • seo网站建设哪家专业国外seo大神
  • 网站建设与运营就业厦门百度公司
  • 整站优化多少钱自己建网站需要钱吗
  • 彭阳门户网站建设安年软文网
  • 网站怎么做微信支付功能百度网络小说排行榜
  • 自做的网站如何发布新冠不易感染三种人
  • 怎么做pc端移动网站seo公司上海牛巨微
  • 沭阳做网站留号码的广告网站不需要验证码
  • 2345网址大全设主页广告seo职位描述
  • 网站开发连接数据库的方法seo公司运营
  • 国内免费云主机seo推广软件费用
  • 小学教学活动设计方案模板成都优化官网公司
  • 自己用自己电脑做网站空间专业公司网络推广
  • 门户网站做公众号的好处网络营销的方式都有哪些
  • 效果型网站建设seo1新地址在哪里