{"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":"f3af749f-71df-5be5-bed2-f29909dddab9","task_key":"release~5fv1--test--2856","task_revision_id":"2","upstream_id":"2856","short_description":"count-complete-subarrays-in-an-array","config":"release_v1","split":"test","body":"{\"contest_date\":\"2023-07-30T00:00:00\",\"contest_id\":\"weekly-contest-356\",\"difficulty\":\"medium\",\"platform\":\"leetcode\",\"question_content\":\"You are given an array nums consisting of positive integers.\\nWe call a subarray of an array complete if the following condition is satisfied:\\n\\nThe number of distinct elements in the subarray is equal to the number of distinct elements in the whole array.\\n\\nReturn the number of complete subarrays.\\nA subarray is a contiguous non-empty part of an array.\\n \\nExample 1:\\n\\nInput: nums = [1,3,1,2,2]\\nOutput: 4\\nExplanation: The complete subarrays are the following: [1,3,1,2], [1,3,1,2,2], [3,1,2] and [3,1,2,2].\\n\\nExample 2:\\n\\nInput: nums = [5,5,5,5]\\nOutput: 10\\nExplanation: The array consists only of the integer 5, so any subarray is complete. The number of subarrays that we can choose is 10.\\n\\n \\nConstraints:\\n\\n1 <= nums.length <= 1000\\n1 <= nums[i] <= 2000\",\"question_title\":\"count-complete-subarrays-in-an-array\",\"starter_code\":\"class Solution:\\n    def countCompleteSubarrays(self, nums: List[int]) -> int:\\n        \"}","display_format":"text","language":"","answer_status":"external_grader","assets":[],"source_url":"https://livecodebench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}