{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"livecodebench","formal_name":"LiveCodeBench","introduction":"競技プログラミングの新しい問題を継続的に収集し、コードに関する能力を評価するベンチマークです。初期release_v1は400問で、問題の出題元と公開日時、データセットの版を区別して扱います。\n\nLiveCodeBench 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"},"task_id":"1b61cc26-69c3-503e-998d-8184996acdfe","task_key":"release~5fv1--test--2919","task_revision_id":"1","upstream_id":"2919","short_description":"maximum-number-of-groups-with-increasing-length","config":"release_v1","split":"test","body":"{\"contest_date\":\"2023-07-23T00:00:00\",\"contest_id\":\"weekly-contest-355\",\"difficulty\":\"hard\",\"platform\":\"leetcode\",\"question_content\":\"You are given a 0-indexed array usageLimits of length n.\\nYour task is to create groups using numbers from 0 to n - 1, ensuring that each number, i, is used no more than usageLimits[i] times in total across all groups. You must also satisfy the following conditions:\\n\\nEach group must consist of distinct numbers, meaning that no duplicate numbers are allowed within a single group.\\nEach group (except the first one) must have a length strictly greater than the previous group.\\n\\nReturn an integer denoting the maximum number of groups you can create while satisfying these conditions.\\n \\nExample 1:\\n\\nInput: usageLimits = [1,2,5]\\nOutput: 3\\nExplanation: In this example, we can use 0 at most once, 1 at most twice, and 2 at most five times.\\nOne way of creating the maximum number of groups while satisfying the conditions is: \\nGroup 1 contains the number [2].\\nGroup 2 contains the numbers [1,2].\\nGroup 3 contains the numbers [0,1,2]. \\nIt can be shown that the maximum number of groups is 3. \\nSo, the output is 3. \\nExample 2:\\n\\nInput: usageLimits = [2,1,2]\\nOutput: 2\\nExplanation: In this example, we can use 0 at most twice, 1 at most once, and 2 at most twice.\\nOne way of creating the maximum number of groups while satisfying the conditions is:\\nGroup 1 contains the number [0].\\nGroup 2 contains the numbers [1,2].\\nIt can be shown that the maximum number of groups is 2.\\nSo, the output is 2. \\n\\nExample 3:\\n\\nInput: usageLimits = [1,1]\\nOutput: 1\\nExplanation: In this example, we can use both 0 and 1 at most once.\\nOne way of creating the maximum number of groups while satisfying the conditions is:\\nGroup 1 contains the number [0].\\nIt can be shown that the maximum number of groups is 1.\\nSo, the output is 1. \\n\\n \\nConstraints:\\n\\n1 <= usageLimits.length <= 10^5\\n1 <= usageLimits[i] <= 10^9\",\"question_title\":\"maximum-number-of-groups-with-increasing-length\",\"starter_code\":\"class Solution:\\n    def maxIncreasingGroups(self, usageLimits: 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":[]}