{"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":"e04b3df4-40dc-5d5c-8d16-b77c53b097fb","task_key":"release~5fv1--test--2800","task_revision_id":"2","upstream_id":"2800","short_description":"minimum-string-length-after-removing-substrings","config":"release_v1","split":"test","body":"{\"contest_date\":\"2023-05-21T00:00:00\",\"contest_id\":\"weekly-contest-346\",\"difficulty\":\"easy\",\"platform\":\"leetcode\",\"question_content\":\"You are given a string s consisting only of uppercase English letters.\\nYou can apply some operations to this string where, in one operation, you can remove any occurrence of one of the substrings \\\"AB\\\" or \\\"CD\\\" from s.\\nReturn the minimum possible length of the resulting string that you can obtain.\\nNote that the string concatenates after removing the substring and could produce new \\\"AB\\\" or \\\"CD\\\" substrings.\\n \\nExample 1:\\n\\nInput: s = \\\"ABFCACDB\\\"\\nOutput: 2\\nExplanation: We can do the following operations:\\n- Remove the substring \\\"ABFCACDB\\\", so s = \\\"FCACDB\\\".\\n- Remove the substring \\\"FCACDB\\\", so s = \\\"FCAB\\\".\\n- Remove the substring \\\"FCAB\\\", so s = \\\"FC\\\".\\nSo the resulting length of the string is 2.\\nIt can be shown that it is the minimum length that we can obtain.\\nExample 2:\\n\\nInput: s = \\\"ACBBD\\\"\\nOutput: 5\\nExplanation: We cannot do any operations on the string so the length remains the same.\\n\\n \\nConstraints:\\n\\n1 <= s.length <= 100\\ns consists only of uppercase English letters.\",\"question_title\":\"minimum-string-length-after-removing-substrings\",\"starter_code\":\"class Solution:\\n    def minLength(self, s: str) -> 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":[]}