lotusor
lotusor
全部文章
分类
归档
标签
去牛客网
登录
/
注册
lotusor的博客
全部文章
(共16篇)
题解 | 构造序列
n,m = map(int,input().split()) if m==n: print(m*2) elif m==0 or n==0: print(1) else : print(min(n,m)*2+1)
2025-12-06
0
93
题解 | 如果直接枚举所有的肯定会超时,所以要先预处理记录#的位置
n = int(input()) list0 = [list(input().strip()) for _ in range(n)] # 收集所有#的位置 points = [] for i in range(n): for j in range(n): if list0[i...
2025-12-06
0
88
题解 | 简单的常规模拟
n = int(input()) s = input().split() new = "" for i in range(len(s)): if s[i] == "0" : continue else : p =...
2025-12-06
0
80
题解 | 铺地毯
import sys n = int(input()) list0 = [list(map(int, input().split())) for i in range(n)] x,y = map(int, input().split()) t = -1 for j in range(n): ...
2025-12-02
0
100
题解 | 排序危机之利用py的异常机制的一个很邪门的解法
#很不推荐大家在正赛用try,有点不规范,但可以开阔下思路( a = int(input()) n = input() low = "" up = "" num = "" for i in n: try : p = ...
2025-12-02
1
97
题解 | 添加逗号
n = input() m = n[::-1] count = 0 s = "" for i in m: count += 1 if count % 3 == 0 and count != len(m): s += i + ","...
2025-12-02
0
108
首页
上一页
1
2
下一页
末页