题解列表

筛选

python 最小绝对值问题

摘要:解题思路:注意事项:遍历从a[0]开始参考代码:a=list(map(int,input().split()))t=a[0]c=0for i in range(len(a)):    if abs(t……

2860基础解法(Python)

摘要:解题思路:全小写(大写)、替换空格、删除冗余注意事项:一定要加strip()参考代码:n1 = input().lower().replace(' ', '').str……

bfs迷宫最短路径-Python

摘要:解题思路: bfs 建议看b站这个视频https://www.bilibili.com/video/BV1CM4y1o7nZ/?spm_id_from=333.880.my_history.page.……

城市路(Dijkstra)

摘要:解题思路:注意事项:参考代码:import heapqN=100010e=[0]*Nne=[0]*Nw=[0]*Nh=[-1]*Nindex=0st=[False]*Ndef add(a,b,c): ……

结构体之时间设计

摘要:解题思路:注意事项:参考代码:a,b,c = map(int,input().split())#输入list1 = [31,29,31,30,31,30,31,31,30,31,30,31]#闰年每月……

杨辉三角——python

摘要:解题思路:注意事项:参考代码:n,m = map(int,input().split())L = [[1],[1,1]]for i in range(1,n):    a = L[i]    b = ……