牛客242693846号
牛客242693846号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客242693846号的博客
全部文章
(共7篇)
题解 | 元素方碑
n = int(input()) for _ in range(n): m = int(input()) ls = list(map(int,input().split())) if len(ls)>1: a = ls[::2] b = ...
2025-07-14
0
10
题解 | 插队
n, m = map(int, input().split()) ls = input().split() # 维护前后关系,双向链表结构 prev = {} next = {} for i in range(n): if i > 0: prev[ls[i]] = ...
2025-07-11
0
10
题解 | 明天星期几?
map = [1,2,3,4,5,6,7,1] print(map[int(input())])
2025-07-08
0
11
题解 | #数据分类处理#
order1 = list(map(int,input().split()[1:])) order2 = list(map(int,input().split()[1:])) order2_new = [] #order2去重 for&nb...
数组
字符串
2022-09-21
0
279
题解 | #自动售货系统#
pricedict = {"A1":2,"A2":3,"A3":4,"A4":5,"A5":8,"A6":6} mountdict = {"A1":0,"A2":0,"A3":0,"A4":0,"A5":0,"A6":0} moneybox =&nb...
Python3
数组
字符串
设计
2022-09-21
0
305
题解 | #矩阵乘法计算量估算#
def calmul(a,b,c,d): return a*b*d num = int(input()) matrixs = [] for i in range(...
Python3
数组
栈
2022-09-20
0
334
题解 | #识别有效的IP地址和掩码并进行分类统计#
def iswrongyan(ip2): index = [0 for x in range(32)] for i ...
Python3
字符串
数组
2022-09-19
0
389