BSF
BSF
全部文章
题解
归档
标签
去牛客网
登录
/
注册
BSF的博客
全部文章
/ 题解
(共81篇)
题解 | #高精度整数加法#
while True: try: s1, s2 = input(), input() l1, l2 = len(s1), len(s2) if l1 < l2: s1 = '0' * (l2-l1) + s1 ...
Python3
2021-10-21
0
457
题解 | #迷宫问题#
while True: try: m, n = list(map(int, input().split())) maze = [] for _ in range(m): maze.append(list(map(int...
Python3
2021-10-21
76
8342
题解 | #自守数#
while True: try: n = int(input()) count = 0 for i in range(n+1): if str(i) == str(i**2)[-len(str(i)):]: ...
Python3
2021-10-21
37
2229
题解 | #查找组成一个偶数最接近的两个素数#
def judge(n): for i in range(2, n): if n % i == 0: return False return True while True: try: n = int(input())...
Python3
2021-10-21
6
638
题解 | #称砝码#
while True: try: n = int(input()) mList = list(map(int, input().split())) xList = list(map(int, input().split())) ...
Python3
2021-10-21
15
1207
题解 | #蛇形矩阵#
while True: try: n = int(input()) start, right, down, m = 1, 2, 1, n for i in range(n): num, step = start, rig...
Python3
2021-10-21
4
969
题解 | #整型数组合并#
while True: try: n1, nums1 = int(input()), list(map(int, input().split())) n2, nums2 = int(input()), list(map(int, input().split()...
Python3
2021-10-21
0
445
题解 | #Redraiment的走法#
# 最大上升子序LIS def lengthOfLIS(lst): dp = [1] * len(lst) for i in range(len(lst)): for j in range(i): if lst[i] > lst[j]: ...
Python3
2021-10-21
1
560
题解 | #火车进站#
res = [] def dfs(wait, stack, out): if not wait and not stack: res.append(' '.join(map(str, out))) if wait: # 入栈 dfs(wait[1:]...
Python3
2021-10-21
97
7657
题解 | #放苹果#
while True: try: m, n = list(map(int, input().split())) dp = [[0] * (n+1) for _ in range(m+1)] for i in range(m+1): ...
Python3
2021-10-21
1
486
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页