题解列表
3129: 信息学奥赛一本通T1352-奖金(拓扑排序)
摘要:解题思路:注意事项:参考代码:n,m = map(int,input().split())
# 构造图
graph = {i:[] for i in range(1,n+1)}
for i in……
蓝桥杯2022年第十三届省赛真题-纸张尺寸
摘要:解题思路:注意事项:参考代码:a=input()k=int(a[1])long=1189width=841temp=0i=0while(i!=k): long=long//2 if wid……
蓝桥杯2020年第十一届省赛真题-单词分析(通俗易懂)
摘要:lst=list(input())lst_zi_dian_xu=sorted(lst)print(lst_zi_dian_xu)lst_ci_shu=sorted(lst_zi_dian_xu,key……
前缀和,区分完全二叉树和满二叉树的概念
摘要:解题思路:完全二叉树最后一层是有可能不满的注意事项:参考代码:n=int(input())a=[0]+list(map(int,input().split()))s=[0]+[a[1]]for i i……
蓝桥杯算法提高-数组求和
摘要:解题思路:注意事项:参考代码:n,m = map(int,input().split())L = list(map(int,input().split()))L = L[-m:]+LL2 = []fo……
三行代码的python解法
摘要:解题思路:就是判断每一棵树到最左边和最右边那一边更远,然后最远距离直接*2注意事项:参考代码:n=int(input())
for i in range(n):
print(2*(max……
信息学奥赛一本通T1627-最大公约数
摘要:解题思路:注意事项:参考代码:from math import*a,b = [int(input())for i in range(2)]print(gcd(a,b))……