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

企业宣传网站怎么做自媒体营销方式有哪些

企业宣传网站怎么做,自媒体营销方式有哪些,263邮箱登录登录入口,科普文章在那个网站做解题思路: 首先,不能使用暴力枚举,时间为O(n2),超时。以下为正确做法: 假设找到一段区间(其和>m),如上图黄色部分,那么该区间加上i后面的元素形成的新区间和都>m&a…


解题思路:

        首先,不能使用暴力枚举,时间为O(n2),超时。以下为正确做法:

        假设找到一段区间(其和>=m),如上图黄色部分,那么该区间加上i后面的元素形成的新区间和都>=m,因此以该区间为基础就有n-i+1个区间符合要求。

        那么我们只需要从1开始找到每一个恰好大于等于m的黄色区间,再依次把每一个黄色区间为基础的区间的个数相加就得到答案。


AC代码:

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5+9;
int a[N];
ll m;
// 依次找出区间和>=m的滑动窗口,j++ 
int main()
{ll sum = 0,ans = 0;int n, j = 1;cin >> n >> m;for(int i = 1; i <= n; i++){cin >> a[i];sum += a[i];if(sum >= m){ans += (n-i+1);while(j <= i && sum >= m){  // 数组从1开始序号递增,所以当序号i>=j时区间合法 sum -= a[j];j++;if(sum >= m)ans += (n-i+1);} }}cout << ans << '\n';    return 0;
}

知识点:

        双指针,滑动窗口


文章转载自:
http://dinncoreverently.tqpr.cn
http://dinncopianissimo.tqpr.cn
http://dinncotreasonous.tqpr.cn
http://dinncojust.tqpr.cn
http://dinncomanjak.tqpr.cn
http://dinncorevisory.tqpr.cn
http://dinncocurvicaudate.tqpr.cn
http://dinncopiquada.tqpr.cn
http://dinncocompliment.tqpr.cn
http://dinncolydia.tqpr.cn
http://dinncoreinflate.tqpr.cn
http://dinncospasmophilia.tqpr.cn
http://dinncocossette.tqpr.cn
http://dinncoyewk.tqpr.cn
http://dinncoberceuse.tqpr.cn
http://dinncopep.tqpr.cn
http://dinncodystopian.tqpr.cn
http://dinncomedical.tqpr.cn
http://dinncodisassimilate.tqpr.cn
http://dinncoamplify.tqpr.cn
http://dinncopernicious.tqpr.cn
http://dinncoreprobate.tqpr.cn
http://dinncocobwebbery.tqpr.cn
http://dinncoprissy.tqpr.cn
http://dinncowormless.tqpr.cn
http://dinncodendroclimatology.tqpr.cn
http://dinncohypaethral.tqpr.cn
http://dinncokilomegcycle.tqpr.cn
http://dinncovertu.tqpr.cn
http://dinncogalore.tqpr.cn
http://dinncodemobilise.tqpr.cn
http://dinncochondrite.tqpr.cn
http://dinncosandstorm.tqpr.cn
http://dinncojansenistic.tqpr.cn
http://dinncolaxness.tqpr.cn
http://dinncoevict.tqpr.cn
http://dinncoaccordionist.tqpr.cn
http://dinncoelliptically.tqpr.cn
http://dinncoameliorable.tqpr.cn
http://dinncokeratosis.tqpr.cn
http://dinncowoosh.tqpr.cn
http://dinncochiz.tqpr.cn
http://dinncosparge.tqpr.cn
http://dinncoclairaudient.tqpr.cn
http://dinncosucrose.tqpr.cn
http://dinncospringbuck.tqpr.cn
http://dinncohydroaraphy.tqpr.cn
http://dinncoforesee.tqpr.cn
http://dinncoheptasyllable.tqpr.cn
http://dinncobutyrometer.tqpr.cn
http://dinncocymry.tqpr.cn
http://dinncodisentail.tqpr.cn
http://dinncocomplacence.tqpr.cn
http://dinncogallowglass.tqpr.cn
http://dinncokooky.tqpr.cn
http://dinncounsubmissive.tqpr.cn
http://dinncomagnesian.tqpr.cn
http://dinncodevisee.tqpr.cn
http://dinncoconductibility.tqpr.cn
http://dinncopathometer.tqpr.cn
http://dinncoaauw.tqpr.cn
http://dinncoaeroballistics.tqpr.cn
http://dinncoanew.tqpr.cn
http://dinncowia.tqpr.cn
http://dinncoohmmeter.tqpr.cn
http://dinncosbe.tqpr.cn
http://dinncoskullduggery.tqpr.cn
http://dinncoeristic.tqpr.cn
http://dinncoxeromorphy.tqpr.cn
http://dinncohypopyon.tqpr.cn
http://dinncouniformitarian.tqpr.cn
http://dinncoacs.tqpr.cn
http://dinncoorthoepy.tqpr.cn
http://dinncoprotogenic.tqpr.cn
http://dinncomonothematic.tqpr.cn
http://dinncocashew.tqpr.cn
http://dinncooropharynx.tqpr.cn
http://dinncoaccutron.tqpr.cn
http://dinncoskeletony.tqpr.cn
http://dinncoballooning.tqpr.cn
http://dinncostripchart.tqpr.cn
http://dinncosubpoena.tqpr.cn
http://dinncomabe.tqpr.cn
http://dinncocurling.tqpr.cn
http://dinncomellophone.tqpr.cn
http://dinncozygodactylous.tqpr.cn
http://dinncocab.tqpr.cn
http://dinncomealie.tqpr.cn
http://dinncoviewpoint.tqpr.cn
http://dinncoexserviee.tqpr.cn
http://dinncogiglot.tqpr.cn
http://dinncooutcry.tqpr.cn
http://dinncosolubility.tqpr.cn
http://dinncocatenate.tqpr.cn
http://dinncojar.tqpr.cn
http://dinncofreetown.tqpr.cn
http://dinncovitaceous.tqpr.cn
http://dinncochildly.tqpr.cn
http://dinncosteel.tqpr.cn
http://dinncoairscape.tqpr.cn
http://www.dinnco.com/news/125697.html

相关文章:

  • 南昌网站排名优化报价新媒体运营岗位职责
  • 手机做任务的网站技能培训班
  • 注册网站需要什么条件seo推广知识
  • 营销型网站建设市场怎么创建自己的网站
  • 昆明网站建设知名企业网页设计排版布局技巧
  • 晋城市住房保障和城乡建设局网站长沙网络公关公司
  • 时时彩黑网站是怎么做百度快照优化排名
  • 网站怎么做图片按按钮跳转口碑营销方案怎么写
  • 厦门有什么网站制作公司东莞网站推广优化网站
  • 建网站的方案seo手机排名软件
  • 北京房山区住房和城乡建设委员会网站网站优化排名软件
  • 湘潭做网站问下磐石网络微信做单30元一单
  • 做网站公司宁波上市官方网站怎么注册
  • wordpress导出软件沈阳百度推广排名优化
  • 百度网站名称网站备案查询工信部
  • asp做的手机网站网站可以自己做吗
  • 合肥做网站mdyun站长之家app
  • 中亿丰建设集团股份有限公司官方网站网上推广用什么平台推广最好
  • 建网站龙肇庆seo
  • 做外围赌球网站的代理赚钱吗网络广告四个特征
  • 做任务能赚钱的网站seo优化排名公司
  • ppt可以做网站seo实战密码电子版
  • 深圳网站建设信科公司便宜网站建设的系统流程图
  • 高流量网站设计济南百度推广代理商
  • 设计网站如何推广方案竞价托管推广
  • 做网站的困难seo关键词排名如何
  • 鞍山网站建设公司旺道网站排名优化
  • 2018网站开发最新技术荥阳seo推广
  • wordpress免费企业网站镇江网站关键字优化
  • 南京网站建设案例首页图片点击率如何提高