意若久时天然呆
意若久时天然呆
全部文章
分类
归档
标签
去牛客网
登录
/
注册
意若久时天然呆的博客
全部文章
(共25篇)
题解 | 机器翻译
m, n = map(int, input().strip().split()) w, t, c = list(map(int, input().strip().split())), [], 0 for i in w: if i in t: continue else...
2025-11-26
1
4
题解 | 参议院投票
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # 求出最终获胜帮派的名称 # @param s string字符串 # @return string字符串 # class Solution: def predictVictory(self, s: st...
2025-11-25
1
6
题解 | 无法吃午餐的学生数量
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param students int整型一维数组 # @param sandwiches int整型一维数组 # @return int整型 # class Solution: def count...
2025-11-24
1
7
题解 | 【模板】队列操作
que, n = [], int(input().strip()) for _ in range(n): a = list(map(int, input().strip().split(" "))) if a[0] == 1: que.append...
2025-11-24
1
7
题解 | 验证栈序列
q = int(input().strip()) for _ in range(q): t, j, n, pushed, popped = ( [], 0, int(input().strip()), list(map(str,...
2025-11-24
1
8
题解 | 吐泡泡
n = int(input()) for _ in range(n): li, a = list(input().strip()), [] for i in li: if i == "o": if a and a[-1] =...
2025-11-14
1
14
题解 | 括号配对问题
import sys a, s, t = "", "", [] for line in sys.stdin: a = line.split() for i in a[0]: if i in "()[]": ...
2025-11-14
1
15
题解 | 最厉害的学生
N = int(input()) a = [] for i in range(N): s, c1, c2, c3 = input().split() t = int(c1) + int(c2) + int(c3) a.append((s, c1, c2, c3, t)) re...
2025-11-07
1
21
题解 | 校门外的树
L, M = map(int, input().split()) t = [1] * (L + 1) for _ in range(M): l, r = map(int, input().split()) for j in range(l, r + 1): t[j] ...
2025-11-04
1
19
题解 | 记数问题
n, x = map(int, input().split()) c = 0 for i in range(n): c += str(i + 1).count(str(x)) print(c)
2025-11-04
2
24
首页
上一页
1
2
3
下一页
末页