牛客459000288号
牛客459000288号
全部文章
分类
题解(9)
归档
标签
去牛客网
登录
/
注册
牛客459000288号的博客
全部文章
(共38篇)
题解 | 高精度整数加法 | Python Makes World Better
print(int(input()) + int(input()))
2026-01-10
0
6
题解 | ???
T = int(input()) for _ in range(T): s, t = input(), input() j = 0 bFound = False arr = list(s) for i in range(len(s)): chs...
2026-01-10
0
8
题解 | 画展布置
N, M = map(int, input().split()) arr = list(map(int, input().split())) # Algo arr.sort() minL = min(arr[i]**2-arr[i-M+1]**2 for i in range(M-1, N)) ...
2026-01-10
0
8
题解 | 画展布置
N, M = map(int, input().split()) arr = list(map(int, input().split())) # Algo arr.sort() cost = [arr[i]**2-arr[i-1]**2 for i in range(1, N)] m, n = M...
2026-01-10
0
7
题解 | 相差不超过k的最多数
n, k = map(int, input().split()) arr = list(map(int, input().split())) # Algo arr.sort() maxLen = 0 arr.append(1e10) # Sentinel n += 1 i = 0 for j i...
2026-01-09
0
5
题解 | 游游的最长稳定子数组
n = int(input()) arr = list(map(int, input().split())) # Algo i = 0 maxLen = 1 arr.append(1e10) # Sentinel n += 1 for j in range(n-1): if abs(ar...
2026-01-09
0
4
题解 | 小苯的IDE括号问题(easy)
n, k = map(int, input().split()) s = input() oprs = [input() for _ in range(k)] # Algo arr = list(s) ic = arr.index('I') i, j = ic-1, ic+1 for opr in...
2026-01-09
0
6
题解 | 【模板】双指针
n = int(input()) arr = list(map(int, input().split())) res = [] occ = [-1] * n maxLen = -1 i = 0 arr.append(arr[-1]) # Sentinel n += 1 for j in rang...
2026-01-09
0
5
题解 | 走一个大整数迷宫
from collections import deque # Process input n, m, p = map(int, input().split()) ma = [list(map(int, input().split())) for _ in range(n)] mb = [list...
2026-01-09
0
7
题解 | 时津风的资源收集
from collections import deque # Build distance matrix dist = [float("inf")] * 301 dist[10] = 0 dist[300] = 1 q = deque() q.append(10) q.app...
2026-01-09
0
6
首页
上一页
1
2
3
4
下一页
末页