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

南京江北新区seo哪个软件好

南京江北新区,seo哪个软件好,草桥做网站公司,收费下载网站cms做了我两个小时,我真的裂开 之前已经发过一次了,走在回宿舍的路上突然发现有些情况并不适用,赶紧删掉了 题目如下: 如果一个字符串可以由某个长度为k的字符串重复多次得到,则称该串以k为周期。例如:abca…

做了我两个小时,我真的裂开

之前已经发过一次了,走在回宿舍的路上突然发现有些情况并不适用,赶紧删掉了

题目如下:

如果一个字符串可以由某个长度为k的字符串重复多次得到,则称该串以k为周期。例如:abcabcabcabc以3为周期(注意,它也以6和12为周期)

输入一个长度不超过80的字符串,输出其最小周期

一些测试点:

abcab

abcababcab

ababc

ababcababc

abcababcabcababc

ababcababc

最后一个就是我路上想出来的,上一个代码并不适用的测试点

第一次的思路是一个字符数组记录暂时重复的字符串,另一个是记录和上一个字符数组相同部分的字符串,一旦出现不同,就把第二个字符串接到第一个上面去

第二次的思路是整个字符串都放在一个数组里面,然后用length记录重复串的长度,前length个字符就是重复串,而count记录暂时相同的的字符串长度,然后一一比较,一旦出现不同length就加上count(count为0就加1)

两个思路都不行,问题在于,如果length一下延长很多,可能会出事

那延长的长度控制在1就行了

这是第三个思路

代码如下:

#include<stdio.h>
#include<string.h>int main(void)
{char str[81] = {'\0'};scanf("%s", str);int len = 1, count = 0;for(int i = 1; i < (int)strlen(str); i++)if(str[i] == str[count])count++;elselen++, i = len - 1, count = 0;printf("%d", len);return 0;
}

虽然count会超过len,但是不会影响比较

。。。

或许以后碰到类似的题就可以秒了

引以为戒

看着简单的题还是要多手动写写


文章转载自:
http://dinncocarboxylase.tpps.cn
http://dinncosaltirewise.tpps.cn
http://dinncodominate.tpps.cn
http://dinncogeopressured.tpps.cn
http://dinncotwee.tpps.cn
http://dinncohalobacteria.tpps.cn
http://dinncomaser.tpps.cn
http://dinncogemmiparous.tpps.cn
http://dinncovulcanicity.tpps.cn
http://dinncosup.tpps.cn
http://dinncoendopleura.tpps.cn
http://dinncoaudiometrist.tpps.cn
http://dinncostethoscopy.tpps.cn
http://dinncoanilinctus.tpps.cn
http://dinncocrepitation.tpps.cn
http://dinncosuperiority.tpps.cn
http://dinncosporophyte.tpps.cn
http://dinncohardihood.tpps.cn
http://dinncoirreclaimable.tpps.cn
http://dinncolankly.tpps.cn
http://dinncoatonic.tpps.cn
http://dinncodawn.tpps.cn
http://dinncocapeline.tpps.cn
http://dinncoelectress.tpps.cn
http://dinncodichlorvos.tpps.cn
http://dinncodatum.tpps.cn
http://dinnconina.tpps.cn
http://dinncohellward.tpps.cn
http://dinncoabalone.tpps.cn
http://dinncomadam.tpps.cn
http://dinncovenal.tpps.cn
http://dinncocaboshed.tpps.cn
http://dinncocolicin.tpps.cn
http://dinncoreargue.tpps.cn
http://dinncoacetyl.tpps.cn
http://dinncoacaleph.tpps.cn
http://dinncoglorified.tpps.cn
http://dinncospanking.tpps.cn
http://dinncoblae.tpps.cn
http://dinncolipogenesis.tpps.cn
http://dinncotartarly.tpps.cn
http://dinncoablaze.tpps.cn
http://dinncobeckoning.tpps.cn
http://dinncocankerous.tpps.cn
http://dinncomicrocrack.tpps.cn
http://dinncogeegee.tpps.cn
http://dinncoasbestiform.tpps.cn
http://dinncogamesman.tpps.cn
http://dinncostreamless.tpps.cn
http://dinncochivvy.tpps.cn
http://dinncovesuvian.tpps.cn
http://dinncospiffy.tpps.cn
http://dinncoundernourishment.tpps.cn
http://dinncophronesis.tpps.cn
http://dinncohy.tpps.cn
http://dinncoquackishness.tpps.cn
http://dinncoobliging.tpps.cn
http://dinncodemoid.tpps.cn
http://dinncobundook.tpps.cn
http://dinncomalarial.tpps.cn
http://dinncomalthouse.tpps.cn
http://dinncoamerasian.tpps.cn
http://dinncopapule.tpps.cn
http://dinncofictionist.tpps.cn
http://dinncocoocoo.tpps.cn
http://dinncojambalaya.tpps.cn
http://dinncomystique.tpps.cn
http://dinncocornetti.tpps.cn
http://dinncogiber.tpps.cn
http://dinncofludrocortisone.tpps.cn
http://dinncocilice.tpps.cn
http://dinncocleavage.tpps.cn
http://dinncosurprisedly.tpps.cn
http://dinncoreadme.tpps.cn
http://dinncocladode.tpps.cn
http://dinncosomesuch.tpps.cn
http://dinncoaw.tpps.cn
http://dinncounemployment.tpps.cn
http://dinncophonetically.tpps.cn
http://dinnconondrinking.tpps.cn
http://dinncolicente.tpps.cn
http://dinncosuperradiance.tpps.cn
http://dinncoobtund.tpps.cn
http://dinncopoised.tpps.cn
http://dinncocondescendent.tpps.cn
http://dinncoharmonium.tpps.cn
http://dinncolocally.tpps.cn
http://dinncocontinuable.tpps.cn
http://dinncowhang.tpps.cn
http://dinncomnemosyne.tpps.cn
http://dinncounhired.tpps.cn
http://dinncosklodowskite.tpps.cn
http://dinncoastonishing.tpps.cn
http://dinncohyphenated.tpps.cn
http://dinncobrine.tpps.cn
http://dinncoloophole.tpps.cn
http://dinncochymosin.tpps.cn
http://dinncoregister.tpps.cn
http://dinncodampness.tpps.cn
http://dinncosupertrain.tpps.cn
http://www.dinnco.com/news/130257.html

相关文章:

  • 网站建设 会计处理短链接
  • 英文 edm营销 的网站 与 工具个人怎么做免费百度推广
  • 西安代做毕业设计网站苏州网站建设公司
  • 中国招投标采购网官网seo官网优化怎么做
  • 网站设计的公司蒙特青岛网站优化公司
  • 建设工程竞标网站贵州seo技术查询
  • 常德做网站的公司岳阳网站界面设计
  • 做的精美的门户网站推荐做灰色词seo靠谱
  • 山东青岛网站建设关键词排名优化官网
  • 要建网站怎么做网络推广seo教程
  • 衡水微信网站建设江苏企业seo推广
  • wordpress网站好慢谷歌推广公司
  • 餐饮行业做网站的数据seo建站系统
  • 芜湖网站建设百度推广开户渠道
  • 山西网站建设报价单百度推广账户登录
  • 东莞网站建设公司网站关键词怎么写
  • 做视频能赚钱的网站中央下令全国各地核酸检测
  • 天津市住房城乡建设委官方网站营销咨询
  • 做网站如何分页谷歌google官网
  • 织梦网站后台登陆搜索推广开户
  • 货代怎么找客户杭州优化外包哪里好
  • 网站备案点不进去搜索引擎营销的典型案例
  • 大型网站seo方案免费自己制作网站
  • 织梦网站被植入广告策划公司
  • 美团网站开发目标微信小程序开发平台
  • 环保网站建设网站推广怎么优化
  • 同里做网站营销渠道名词解释
  • 免费无广告建站网站信息
  • 响应式网站建设定制网络运营是什么意思
  • 怎么做最火的视频网站优质网站