AlphaGrey
AlphaGrey
全部文章
分类
华为刷题(57)
题解(6)
归档
标签
去牛客网
登录
/
注册
AlphaGrey的博客
一起刷题吧
全部文章
(共4篇)
题解 | #Redraiment的走法#
import sys for i, line in enumerate(sys.stdin): if i%2==1: data=line.strip().split() nums=[int(d) for d in data] ...
Python3
动态规划
2021-10-20
0
300
题解 | #查找两个字符串a,b中的最长公共子串#
while True: try: s1=input() s2=input() if len(s1)>len(s2): s1,s2=s2,s1 len1, len2...
Python3
动态规划
2021-10-20
0
327
题解 | #计算字符串的距离#
import sys line1=line2=None for i, line in enumerate(sys.stdin): line=line.strip() if i%2==0: line1=line else: line2=line...
Python3
动态规划
2021-10-19
0
361
题解 | #公共子串计算#
import sys a, b=sys.stdin.readlines() str1, str2=a.strip(), b.strip() row, col=len(str1), len(str2) matrix = [[0 for _ in range(col+1)] for _ in ra...
Python3
动态规划
2021-09-29
0
325