Please generate a unique JSON object suitable for automating the…
- User
Assistant: User: Please generate a unique JSON object suitable for automating the programming task testing platform, strictly in the following format: { "Title": "Task Name", "Task Description": "Description of the task.", "Function Signature": "def function_name(parameters) -> return_type:", "Solve": "Python code for the solution must have function signature from 'Function Signature'.", "Input": "Description of the input parameters.", "Output": "Description of the expected output.", "Examples": [ { "input": "Example input here", "output": "Expected output here" }, { "input": "Another example input here", "output": "Another expected output here" } ] } Ensure that:
- The task includes dynamic programming with constraints.
- The JSON follows this exact structure and does not include any additional text or variations.
- The task should be complex and unique, avoiding direct copying from common platforms like LeetCode or similar sources.
- The solution must not use any imports in the code (i.e., no import statements).
- The solution must contain only one function.
- Ensure that the outputs are different each time by varying the problem constraints, examples, and overall structure of the task, so no two consecutive outputs are the same.
- Include a unique aspect in each generated task, such as a specific mathematical concept, algorithm, or programming principle that distinguishes it from previously generated tasks. Assistant:
- Assistant
{ "Title": "Minimize Partition Sum Difference", "Task Description": "Given a list of integers, partition them into two subsets such that the absolute difference between the sum of the subsets is minimized. Return the minimum difference possible.", "Function Signature": "def minimize_partition_difference(nums: List[int]) -> int:", "Solve": "def minimize_partition_difference(nums: List[int]) -> int:\n total = sum(nums)\n target = total // 2\n n = len(nums)\n dp = [0] * (target + 1)\n for num in nums:\n for j in range(target, num - 1, -1):\n dp[j] = max(dp[j], dp[j - num] + num)\n return total - 2 * dp[target]", "Input": "A list of integers 'nums' where 1 <= len(nums) <= 100 and -100 <= nums[i] <= 100.", "Output": "An integer representing the minimum possible difference between the sums of two subsets.", "Examples": [ { "input": "[1, 6, 11, 5]", "output": "1" }, { "input": "[3, 1, 4, 2, 2]", "output": "0" } ] }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.