题解列表
1426: 蓝桥杯历届试题-九宫重排(Python3)
摘要:解题思路: 同1878题。注意事项: 此题不能用二维数组表示状态(注释部分),会超时。参考代码:def bfs():
global start, end, cache_state……
优质题解
1878: 蓝桥杯2017年第八届真题-青蛙跳杯子(Python3)BFS
摘要:解题思路: 1.BFS遍历所有状态,储存状态及其对应的步数; 2.发现和结果吻合则退出。注意事项: 1.使用字典存储某一状态和对应步数,便于查找重复状态,降低时间复杂度; 2.……
蓝桥杯2019年第十届真题-扫地机器人-题解(Python代码)
摘要:已经AC参考:https://blog.dotcpp.com/a/68642 的思路用python写了一遍参考代码:def judge(m,q):
for i in range(k):
……
蓝桥杯算法训练VIP-一元三次方程求解(暴力就完事)
摘要:解题思路:注意事项:参考代码:a,b,c,d=map(float,input().split())
x=-100
while x<100:
cnt=0
if abs(a*x**……
蛇形矩阵(for循环依次打印) python代码
摘要:解题思路:注意事项:参考代码:a = int(input())list1 = []list2 = []for i in range(1,a+1): list1.append((1+i)*i//2……
简单python走起 超简单
摘要:解题思路1.设置一个函数判断是否是质数2。先判断各位 然后判断十位数。。。。。注意事项:参考代码:import math
def zs(i):
if i%2 == 0:
……
python 字符串对比
摘要:解题思路:注意事项:参考代码:str1 = input()str2 = input()if len(str1) != len(str2): print(1)elif len(str1) == l……
2259: 蓝桥杯算法提高-三进制数位和(Python3)
摘要:解题思路:注意事项:参考代码:def turn(n):
res = ''
division = 3 ** 5
while division:
……