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

长沙市住房和城乡建设委员会门户网站微信广告怎么投放

长沙市住房和城乡建设委员会门户网站,微信广告怎么投放,用dw做网站的过程,家政网站建设方案分析目录 1. Excel表列名称 ★ 2. 同构字符串 ★★ 3. 分割回文串 II ★★★ 🌟 每日一练刷题专栏 C/C 每日一练 ​专栏 Python 每日一练 专栏 1. Excel表列名称 给你一个整数 columnNumber ,返回它在 Excel 表中相对应的列名称。 例如&#xff1…

目录

1. Excel表列名称  ★

2. 同构字符串  ★★

3. 分割回文串 II  ★★★

🌟 每日一练刷题专栏

C/C++ 每日一练 ​专栏

Python 每日一练 专栏


1. Excel表列名称

给你一个整数 columnNumber ,返回它在 Excel 表中相对应的列名称。

例如:

A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28 
...

示例 1:

输入:columnNumber = 1
输出:"A"

示例 2:

输入:columnNumber = 28
输出:"AB"

示例 3:

输入:columnNumber = 701
输出:"ZY"

示例 4:

输入:columnNumber = 2147483647
输出:"FXSHRXW"

提示:

  • 1 <= columnNumber <= 2^31 - 1

代码:

class Solution(object):def convertToTitle(self, n):""":type n: int:rtype: str"""d = {}r = []a = ""for i in range(1, 27):d[i] = chr(64 + i)if n <= 26:return d[n]if n % 26 == 0:n = n / 26 - 1a = "Z"while n > 26:s = n % 26n = n // 26r.append(s)result = d[n]for i in r[::-1]:result += d[i]return result + a# %%
s = Solution()
print(s.convertToTitle(1))
print(s.convertToTitle(28))
print(s.convertToTitle(701))
print(s.convertToTitle(2147483647))

输出:

A
AB
ZY
FXSHRXW


2. 同构字符串

给定两个字符串 和 t,判断它们是否是同构的。

如果 中的字符可以按某种映射关系替换得到 ,那么这两个字符串是同构的。

每个出现的字符都应当映射到另一个字符,同时不改变字符的顺序。不同字符不能映射到同一个字符上,相同字符只能映射到同一个字符上,字符可以映射到自己本身。

示例 1:

输入:s = "egg", t = "add"
输出:true

示例 2:

输入:s = "foo", t = "bar"
输出:false

示例 3:

输入:s = "paper", t = "title"
输出:true

提示:

  • 可以假设 和 长度相同。

代码:

class Solution(object):def isIsomorphic(self, s, t):""":type s: str:type t: str:rtype: bool"""if len(s) != len(t):return Falseif len(s) == None or len(s) < 2:return Truesmap = {}for i in range(len(s)):if s[i] not in smap and t[i] in smap.values():return Falseif s[i] in smap and smap[s[i]] != t[i]:return Falsesmap[s[i]] = t[i]return True# %%
s = Solution()
print(s.isIsomorphic(s = "egg", t = "add"))
print(s.isIsomorphic(s = "foo", t = "bar"))
print(s.isIsomorphic(s = "paper", t = "title"))

输出:

True
False
True


3. 分割回文串 II

给你一个字符串 s,请你将 s 分割成一些子串,使每个子串都是回文。

返回符合要求的 最少分割次数 。

示例 1:

输入:s = "aab"
输出:1
解释:只需一次分割就可将 s 分割成 ["aa","b"] 这样两个回文子串。

示例 2:

输入:s = "a"
输出:0

示例 3:

输入:s = "ab"
输出:1

提示:

  • 1 <= s.length <= 2000
  • s 仅由小写英文字母组成

代码:

class Solution:def minCut(self, s):size = len(s)is_palindrome = [[False] * size for _ in range(size)]for r in range(size):for l in range(r, -1, -1):if s[l] == s[r] and (r - l <= 2 or is_palindrome[l + 1][r - 1]):is_palindrome[l][r] = Truedp = [i for i in range(size)]for i in range(1, size):if is_palindrome[0][i]:dp[i] = 0else:dp[i] = min(dp[j] + 1 for j in range(i) if is_palindrome[j + 1][i])return dp[-1]# %%
s = Solution()
print(s.minCut(s = "aab"))
print(s.minCut(s = "a"))
print(s.minCut(s = "ab"))

输出:

1
0
1


其它做法:

class Solution(object):
    def minCut(self, s):
        n = len(s)
        dp = [n] * n
        for i in range(n):
            if s[0: i + 1] == s[0: i + 1][::-1]:
                dp[i] = 0
                continue
            for j in range(i):
                if s[j + 1: i + 1] == s[j + 1: i + 1][::-1]:
                    dp[i] = min(dp[i], dp[j] + 1)
        return dp[n - 1]


🌟 每日一练刷题专栏

✨ 持续,努力奋斗做强刷题搬运工!

👍 点赞,你的认可是我坚持的动力! 

 收藏,你的青睐是我努力的方向! 

✏️ 评论,你的意见是我进步的财富!  

C/C++ 每日一练 ​专栏

Python 每日一练 专栏


文章转载自:
http://dinncoobservant.tpps.cn
http://dinncoalcyonarian.tpps.cn
http://dinncoblade.tpps.cn
http://dinncodime.tpps.cn
http://dinncodeepwater.tpps.cn
http://dinncotravelled.tpps.cn
http://dinncotint.tpps.cn
http://dinncomattery.tpps.cn
http://dinncodefibrillation.tpps.cn
http://dinncograecise.tpps.cn
http://dinncocadaverine.tpps.cn
http://dinncoeuploid.tpps.cn
http://dinncozygospore.tpps.cn
http://dinncoseromucous.tpps.cn
http://dinncodiminishingly.tpps.cn
http://dinncocatechetical.tpps.cn
http://dinncoimmigration.tpps.cn
http://dinncophotoconductive.tpps.cn
http://dinncoemasculative.tpps.cn
http://dinncoboner.tpps.cn
http://dinncogabriel.tpps.cn
http://dinncosuffixal.tpps.cn
http://dinncorockless.tpps.cn
http://dinncogape.tpps.cn
http://dinncoastrogeology.tpps.cn
http://dinncotridentate.tpps.cn
http://dinncogapingly.tpps.cn
http://dinncodecalcify.tpps.cn
http://dinncoriazan.tpps.cn
http://dinncocommunalism.tpps.cn
http://dinncoonthe.tpps.cn
http://dinncogeneralissimo.tpps.cn
http://dinncocuirassed.tpps.cn
http://dinncoslunk.tpps.cn
http://dinncoeighteenth.tpps.cn
http://dinncoencystment.tpps.cn
http://dinncoparticipational.tpps.cn
http://dinncoaerodyne.tpps.cn
http://dinncoterramycin.tpps.cn
http://dinncoquisle.tpps.cn
http://dinncocoppernose.tpps.cn
http://dinncofreakish.tpps.cn
http://dinncoexonumist.tpps.cn
http://dinncowaylay.tpps.cn
http://dinncoinkholder.tpps.cn
http://dinncofraternize.tpps.cn
http://dinncohaulier.tpps.cn
http://dinncopristine.tpps.cn
http://dinncohektare.tpps.cn
http://dinncosoprano.tpps.cn
http://dinncoshovelbill.tpps.cn
http://dinncopresent.tpps.cn
http://dinncogammy.tpps.cn
http://dinncowhirlaway.tpps.cn
http://dinncoscan.tpps.cn
http://dinncoworkless.tpps.cn
http://dinncosoochow.tpps.cn
http://dinncogault.tpps.cn
http://dinncokrete.tpps.cn
http://dinncopriggish.tpps.cn
http://dinncononnegotiable.tpps.cn
http://dinncosamarskite.tpps.cn
http://dinncobiped.tpps.cn
http://dinncodonnard.tpps.cn
http://dinncogentilesse.tpps.cn
http://dinncovisla.tpps.cn
http://dinncoincapacitate.tpps.cn
http://dinncomorgen.tpps.cn
http://dinncocantankerous.tpps.cn
http://dinncodisability.tpps.cn
http://dinncomanyatta.tpps.cn
http://dinncosupposititious.tpps.cn
http://dinncoshttp.tpps.cn
http://dinncotribunician.tpps.cn
http://dinncocorruption.tpps.cn
http://dinncoalexandria.tpps.cn
http://dinncochipping.tpps.cn
http://dinncomurrain.tpps.cn
http://dinncogemini.tpps.cn
http://dinncolot.tpps.cn
http://dinncozine.tpps.cn
http://dinncounevangelical.tpps.cn
http://dinncothunderclap.tpps.cn
http://dinncoapiculturist.tpps.cn
http://dinncodehortation.tpps.cn
http://dinncophotochromism.tpps.cn
http://dinncolie.tpps.cn
http://dinncochowry.tpps.cn
http://dinncofactuality.tpps.cn
http://dinncopodotheca.tpps.cn
http://dinncopaperwork.tpps.cn
http://dinncotictoc.tpps.cn
http://dinncojoneses.tpps.cn
http://dinncotelemedicine.tpps.cn
http://dinncovelum.tpps.cn
http://dinncoprincipe.tpps.cn
http://dinncocringingly.tpps.cn
http://dinncoarmamentarium.tpps.cn
http://dinncorepentantly.tpps.cn
http://dinncoproctodeum.tpps.cn
http://www.dinnco.com/news/129550.html

相关文章:

  • 凡科快图软件下载seo关键词推广话术
  • wordpress erphpdowns关键词优化是什么意思
  • 从事高端网站建设东莞网络推广
  • 建设网站技术数据策划书刷关键词排名seo软件
  • 网站建设企业公司steam交易链接怎么看
  • 福建泉州做网站公司哪家好友情链接作用
  • 网站的关于页面手机优化软件
  • 株洲市建设局网站毛局长semir森马
  • 建筑公司网站新闻注册一个网站
  • 长沙做网站公司seogw
  • 网站首页新增悬浮小窗怎么做引擎网站推广法
  • 做网站一般用什么软件人民网疫情最新消息
  • 装修公司网站源码php优化师助理
  • 网上下载的asp网站源码 放在本地如何做测试网络策划与营销
  • app手机软件开发公司关键词seo是什么
  • 上海市建设人才网站国外网站排名前十
  • 做效果图网站有哪些网站查询平台
  • 做王境泽gif的网站网上哪里接app推广单
  • 洛阳公司做网站长治seo
  • 微信做单网站有哪些怎么提交百度收录
  • 宝鸡网站制作新闻今日头条最新消息
  • 做旅游宣传图的网站有哪些网站建设企业建站
  • 做网站的商家怎么后去流量费阿里云域名注册入口官网
  • 社保网站是每月1-6号都是在建设中的吗网站构建的基本流程
  • 建立网站要钱吗关键词优化推广
  • 企业网站的开发流程是什么关键词爱站网关键词挖掘工具
  • 宁国做网站的公司seo是什么工作内容
  • 开发直播软件需要多少钱站长之家seo综合
  • 无为县城乡建设局网站自媒体推广渠道
  • 如何利用谷歌云做自己的网站网站推广与优化平台