网站首页 站内搜索

搜索结果

查询Tags标签: subarray,共有 7条记录
  • AT5749 Subarray Sum

    前言 一道比较简单的题。( 完了完了完了要开学了要开学了。。。 题目大意 给定三个整数 \(N,K,S\)。 请你找到一个 \(N\) 个元素的整数序列,其中每一个元素在区间 \([1,10^9]\) 内。这个序列满足 \(K\) 个子序列的和为 \(S\)。 分析 要求有 \(K\) 个子序列的和是 \(S\),…

    2021/8/30 23:06:31 人评论 次浏览
  • AT5749 Subarray Sum

    前言 一道比较简单的题。( 完了完了完了要开学了要开学了。。。 题目大意 给定三个整数 \(N,K,S\)。 请你找到一个 \(N\) 个元素的整数序列,其中每一个元素在区间 \([1,10^9]\) 内。这个序列满足 \(K\) 个子序列的和为 \(S\)。 分析 要求有 \(K\) 个子序列的和是 \(S\),…

    2021/8/30 23:06:31 人评论 次浏览
  • [LeetCode] 1186. Maximum Subarray Sum with One Deletion 删除一次得到子数组最大和

    Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, you want to choose a subarray and optionally delete one element from it so that there is still at leas…

    2021/8/9 6:06:39 人评论 次浏览
  • [LeetCode] 1186. Maximum Subarray Sum with One Deletion 删除一次得到子数组最大和

    Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, you want to choose a subarray and optionally delete one element from it so that there is still at leas…

    2021/8/9 6:06:39 人评论 次浏览
  • 2021-8-3 Shortest Unsorted Continuous Subarray

    难度 中等 题目 Leetcode: Shortest Unsorted Continuous Subarray Given an integer array nums, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order. Return…

    2021/8/3 23:35:58 人评论 次浏览
  • 2021-8-3 Shortest Unsorted Continuous Subarray

    难度 中等 题目 Leetcode: Shortest Unsorted Continuous Subarray Given an integer array nums, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order. Return…

    2021/8/3 23:35:58 人评论 次浏览
  • 795. Number of Subarrays with Bounded Maximum

    We are given an array nums of positive integers, and two positive integers left and right (left <= right). Return the number of (contiguous, non-empty) subarrays such that the value of the maximum array element in that subarray is at least left and…

    2021/6/18 6:03:02 人评论 次浏览
扫一扫关注最新编程教程