Allen2023wp
Allen2023wp
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Allen2023wp的博客
全部文章
(共3篇)
题解 | #未排序数组中累加和为给定值的最长子数组长度#
N,k = map(int,input().split()) arr = list(map(int,input().split())) sum = 0 length = 0 tmp_dict = {0:-1} for i in range(len(arr)): sum += arr[i]...
2023-06-15
0
242
题解 | #用递归函数和栈逆序一个栈#
N = int(input()) X = list(map(int,input().split())) mm = [X.pop() for i in range(0,len(X))] def resort(n,x): if len(x)-n < n-1: x[len(...
2023-06-14
0
233
题解 | #不重复打印排序数组中相加和为给定值的所有三元组#
import sys n,k = map(int,input().split()) arr = list(map(int,input().split())) for i in range(0,n): if i > 0 and arr[i] == arr[i-1]: c...
2023-06-14
0
368