CARLJOSEPHLEE
CARLJOSEPHLEE
全部文章
分类
题解(26)
归档
标签
去牛客网
登录
/
注册
CARLJOSEPHLEE的博客
全部文章
(共71篇)
题解 | 构造A+B
x,y = map(int,input().split()) print("YES" if x-y>=1 else "NO")
2025-03-11
0
65
题解 | 自守数
l = [1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5...
2025-03-11
0
56
题解 | 小红的二叉树
n = int(input()) if n == 1: print(0) else: pow1 = pow(2,n-1,1000000007) print((3*pow1-5)%1000000007)
2025-03-10
1
62
题解 | 公共子串计算
a = input() b = input() na,nb = len(a),len(b) dp = [[0]*(nb+1) for _ in range(na+1)] for i in range(1,na+1): for j in range(1,nb+1): if a[...
2025-03-06
0
28
题解 | 统计大写字母个数
a = input() cnt = 0 for i in a: if i.isupper(): cnt += 1 print(cnt)
2025-03-05
0
33
题解 | 构造C的歪
a,b = map(int,input().split()) print(2*b-a)
2025-03-05
0
36
题解 | 单词倒排
l = [] for i in range(128): if i not in range(65,65+27) and i not in range(97,97+27): l.append(chr(i)) a = input() l2 = [] for i in a: ...
2025-03-05
0
33
题解 | 简单密码
a = input() def f(x): l = [] for i in x: if i in list("abc"): l.append("2") elif i in list(&qu...
2025-03-05
0
31
题解 | 密码验证合格程序
from sys import stdin input1 = stdin.read().split() def f(x): if len(x) < 8: return False c1,c2,c3,c4 = False,False,False,False ...
2025-03-05
1
29
题解 | 购物单
from collections import defaultdict n,m = map(int,input().split()) n//=10 value = [] weight = [] l0 = [] dict1 = defaultdict(list) for i in range(m): ...
2025-03-05
0
31
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页