牛客229068068号
牛客229068068号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客229068068号的博客
全部文章
(共49篇)
题解 | 两数之和
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param numbers int整型一维数组 # @param target int整型 # @return int整型一维数组 # class Solution: def twoSum(...
2025-10-09
0
9
题解 | 查找第K大的元素
import json list_str =input() list1 = json.loads(list_str) list1.sort(reverse=True) print(list1[2])
2025-08-27
0
28
题解 | 大巴车(数组分块,按块翻转,块内不变)
# 分组上车 people_num ,car_occupy = map(int,input().split()) list_origin =list(map(int,input().split())) list_all =[] for i in range(0, people_num, car_oc...
2025-08-27
0
22
题解 | 大巴车(数组分块,按块翻转,块内不变)
# 分组上车 people_num ,car_occupy = map(int,input().split()) list_origin =list(map(int,input().split())) list_all =[] for i in range(0, people_num, car_oc...
2025-08-27
0
30
题解 | 乔乔的包
# 背包问题: Thing_number, Weight = map(int, input().split()) list_thing = [] for i in range(Thing_number): temp = list(map(int, input().split())) ...
2025-08-26
0
27
题解 | 乔乔的包
# 背包问题: Thing_number, Weight = map(int, input().split()) list_thing = [] for i in range(Thing_number): temp = list(map(int, input().split())) ...
2025-08-26
0
22
题解 | 车辆限行
from os import error from ast import Break list_number =list(map(str,input().split(','))) date = int(input()) count =0 flag =0 for i in list_number: ...
2025-08-20
0
20
题解 | 幸运数字
from collections import deque def count68(min_num,max_num): if max_num<6: return 0 count =0 array = deque(['6','8']) whil...
2025-08-19
0
29
题解 | 单词缩写
num = int(input()) for i in range(num): temp_str = input() if(len(temp_str)<10): print(temp_str) else: list_temp = '' ...
2025-08-18
0
37
题解 | 最长对称子字符串
def search_str(s:str) -> str: def seach_circle(left:int ,right:int) -> str: while(left>= 0 and right<len(s) and s[left]==s[ri...
2025-08-15
0
30
首页
上一页
1
2
3
4
5
下一页
末页