__yyn__
__yyn__
全部文章
分类
归档
标签
去牛客网
登录
/
注册
__yyn__的博客
全部文章
(共5篇)
题解 | 判断两个IP是否属于同一子网
t = list(map(int, input().split('.'))) s1 = list(map(int, input().split('.'))) s2 = list(map(int, input().split('.'))) def f2(s): p = '1' cn...
2025-03-18
0
28
题解 | 单词倒排
s = input() ans = [] r = '' for x in s: if x.isupper() or x.islower(): r += x else: ans.append(r) r = '' if r != ''...
2025-03-17
0
27
题解 | 走方格的方案数
n,m = map(int,input().split()) dp = [[0] * (m + 1) for i in range(n + 1)] for i in range(n + 1): for j in range(m + 1): if i == 0 and j ...
2025-03-17
0
28
题解 | 从单向链表中删除指定值的节点
a = list(map(int,input().split())) n,h,k = a[0],a[1],a[-1] a = a[2:-1] nums = [h] n -= 1 for i in range(n): x,y = a[i * 2],a[i * 2 + 1] idx ...
2025-03-17
0
25
题解 | 字符串加密
s = list(map(str,input())) t = list(map(str,input())) ss = [] v = set() for x in s: if x in v: continue v.add(x) ss.append(x) f...
2025-03-17
0
33