{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"livecodebench","formal_name":"LiveCodeBench","introduction":"LiveCodeBench continuously collects new competitive-programming problems to evaluate coding capabilities. Its initial release_v1 contains 400 problems, with source platform, contest date, and dataset version tracked explicitly.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://livecodebench.github.io/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"7ceb2a36-e33e-5bd4-b2b0-2612d2905866","task_key":"release~5fv1--test--2867","task_revision_id":"1","upstream_id":"2867","short_description":"ways-to-split-array-into-good-subarrays","config":"release_v1","split":"test","body":"{\"contest_date\":\"2023-06-25T00:00:00\",\"contest_id\":\"weekly-contest-351\",\"difficulty\":\"medium\",\"platform\":\"leetcode\",\"question_content\":\"You are given a binary array nums.\\nA subarray of an array is good if it contains exactly one element with the value 1.\\nReturn an integer denoting the number of ways to split the array nums into good subarrays. As the number may be too large, return it modulo 10^9 + 7.\\nA subarray is a contiguous non-empty sequence of elements within an array.\\n \\nExample 1:\\n\\nInput: nums = [0,1,0,0,1]\\nOutput: 3\\nExplanation: There are 3 ways to split nums into good subarrays:\\n- [0,1] [0,0,1]\\n- [0,1,0] [0,1]\\n- [0,1,0,0] [1]\\n\\nExample 2:\\n\\nInput: nums = [0,1,0]\\nOutput: 1\\nExplanation: There is 1 way to split nums into good subarrays:\\n- [0,1,0]\\n\\n \\nConstraints:\\n\\n1 <= nums.length <= 10^5\\n0 <= nums[i] <= 1\",\"question_title\":\"ways-to-split-array-into-good-subarrays\",\"starter_code\":\"class Solution:\\n    def numberOfGoodSubarraySplits(self, nums: List[int]) -> int:\\n        \"}","display_format":"text","language":"","answer_status":"published","assets":[],"source_url":"https://livecodebench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}