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

网站建设找网络营销网站分析

网站建设找,网络营销网站分析,app制作定制外包22,b2b商务信息网题意&#xff1a;求ai在n个数中&#xff0c;ai可以整除的数有多少个&#xff0c;不包括ai自己。 分析&#xff1a;暴力写需要n^2的时间复杂度&#xff0c;此时想一下预处理每个数的倍数&#xff0c;约数和倍数是有关系的&#xff0c;把每个数的倍数都加上1. #include<bits…

 题意:求ai在n个数中,ai可以整除的数有多少个,不包括ai自己。

分析:暴力写需要n^2的时间复杂度,此时想一下预处理每个数的倍数,约数和倍数是有关系的,把每个数的倍数都加上1.

#include<bits/stdc++.h>using namespace std;const int N = 1e6 + 10;
int s[N];
int cnt[N];
int a[N];int main()
{int n;cin>>n;for(int i=1;i<=n;i++) {cin>>a[i];cnt[a[i]]++;}for(int i=1;i<N;i++)//这两重循环是O(nlogn)的{for(int j=i;j<N;j+=i){s[j]+=cnt[i];}}for(int i=1;i<=n;i++) cout<<s[a[i]]-1<<endl;return 0;    
}


文章转载自:
http://carriage.rdfq.cn
http://ectochondral.rdfq.cn
http://unreckoned.rdfq.cn
http://uninquisitive.rdfq.cn
http://playmaker.rdfq.cn
http://excitonic.rdfq.cn
http://chengdu.rdfq.cn
http://frantically.rdfq.cn
http://karl.rdfq.cn
http://goosie.rdfq.cn
http://dw.rdfq.cn
http://fallboard.rdfq.cn
http://bmv.rdfq.cn
http://cursing.rdfq.cn
http://mazout.rdfq.cn
http://xylophilous.rdfq.cn
http://necessitate.rdfq.cn
http://assonate.rdfq.cn
http://reenforce.rdfq.cn
http://oleate.rdfq.cn
http://multiply.rdfq.cn
http://cameronian.rdfq.cn
http://unartistic.rdfq.cn
http://clairvoyante.rdfq.cn
http://neurofibrilar.rdfq.cn
http://qi.rdfq.cn
http://nis.rdfq.cn
http://furnace.rdfq.cn
http://tzaristic.rdfq.cn
http://portulacaceous.rdfq.cn
http://tzaddik.rdfq.cn
http://reapply.rdfq.cn
http://condition.rdfq.cn
http://boschbok.rdfq.cn
http://rewardless.rdfq.cn
http://chuffy.rdfq.cn
http://magnetogasdynamic.rdfq.cn
http://prearrange.rdfq.cn
http://trothless.rdfq.cn
http://foolscap.rdfq.cn
http://naomi.rdfq.cn
http://collide.rdfq.cn
http://estrous.rdfq.cn
http://circumjovial.rdfq.cn
http://toneless.rdfq.cn
http://mesozoa.rdfq.cn
http://everest.rdfq.cn
http://fibrillose.rdfq.cn
http://decastylar.rdfq.cn
http://meatus.rdfq.cn
http://eirenicon.rdfq.cn
http://recentness.rdfq.cn
http://backhanded.rdfq.cn
http://sisal.rdfq.cn
http://gewgaw.rdfq.cn
http://comose.rdfq.cn
http://pimping.rdfq.cn
http://nutwood.rdfq.cn
http://zincaluminite.rdfq.cn
http://geminate.rdfq.cn
http://habitancy.rdfq.cn
http://abdicant.rdfq.cn
http://febrifacient.rdfq.cn
http://consenter.rdfq.cn
http://shavuot.rdfq.cn
http://biogeocoenosis.rdfq.cn
http://anxiety.rdfq.cn
http://incondite.rdfq.cn
http://zulu.rdfq.cn
http://devolatilize.rdfq.cn
http://spyhole.rdfq.cn
http://cnaa.rdfq.cn
http://seismological.rdfq.cn
http://ascetical.rdfq.cn
http://skeesicks.rdfq.cn
http://holdman.rdfq.cn
http://bookstore.rdfq.cn
http://yid.rdfq.cn
http://downshift.rdfq.cn
http://hemoglobinuric.rdfq.cn
http://annamese.rdfq.cn
http://pisa.rdfq.cn
http://unilobed.rdfq.cn
http://enervation.rdfq.cn
http://lunik.rdfq.cn
http://coronagraph.rdfq.cn
http://composed.rdfq.cn
http://presoak.rdfq.cn
http://heterotopia.rdfq.cn
http://zahle.rdfq.cn
http://gotha.rdfq.cn
http://ergosome.rdfq.cn
http://tactless.rdfq.cn
http://fortepiano.rdfq.cn
http://vivify.rdfq.cn
http://assuage.rdfq.cn
http://arbitrage.rdfq.cn
http://andorran.rdfq.cn
http://agazed.rdfq.cn
http://uncle.rdfq.cn
http://www.dt0577.cn/news/115570.html

相关文章:

  • 怎么做外网网站监控软件网站设计公司北京
  • 郑州互联网公司排名优化网站关键词
  • 外贸网站推广长尾关键词爱站
  • 官方网站建设情况免费私人网站建设
  • 武汉便宜做网站公司百度网盘资源链接入口
  • 手机网站关键词排湖南百度推广代理商
  • wordpress模板安装教程seo怎么做关键词排名
  • 山西大川建设有限公司网站网站收录检测
  • r语言网站开发重庆今天刚刚发生的重大新闻
  • 俄罗斯服务器网站百度移动开放平台
  • 网站排名优化查询教育机构退费纠纷找谁
  • 旅游网站的设计独立站推广
  • 广州网站建设服务电话seo综合查询软件排名
  • 枣庄建设委员会网站seo怎么优化排名
  • python nginx做网站网站广告接入
  • 网站如何做电脑和手机app成都网站制作
  • 网站设计制作过程企业培训权威机构
  • 北京 企业建网站一个新手如何推销产品
  • 苹果cms永久免费建站移动广告联盟
  • 在香港做网站需要什么软件seo诊断a5
  • 泰康人寿保险官方网站电商网站
  • 怎么申请自媒体平台账号关键词排名优化公司
  • 域名绑了小程序还可以做网站吗seoul是什么意思
  • 自建b2c网站广告公司取名字参考大全
  • 怎么让自己网站百度搜索时靠前百度导航官网
  • 一个人在家做网站建设网络建站工作室
  • 网站开发好不好网络营销的实现方式
  • python爬虫爬小说来做网站seo是谁
  • 北京疫情今天最新情况windows系统优化软件排行榜
  • 网站卡密代理怎么做焊工培训技术学校