{"task": {"agent_timeout": 1800, "task": "polyglot_javascript_killer-sudoku-helper", "verifier_timeout": 1800, "instruction": "# Instructions\n\nA friend of yours is learning how to solve Killer Sudokus (rules below) but struggling to figure out which digits can go in a cage.\nThey ask you to help them out by writing a small program that lists all valid combinations for a given cage, and any constraints that affect the cage.\n\nTo make the output of your program easy to read, the combinations it returns must be sorted.\n\n## Killer Sudoku Rules\n\n- [Standard Sudoku rules][sudoku-rules] apply.\n- The digits in a cage, usually marked by a dotted line, add up to the small number given in the corner of the cage.\n- A digit may only occur once in a cage.\n\nFor a more detailed explanation, check out [this guide][killer-guide].\n\n## Example 1: Cage with only 1 possible combination\n\nIn a 3-digit cage with a sum of 7, there is only one valid combination: 124.\n\n- 1 + 2 + 4 = 7\n- Any other combination that adds up to 7, e.g. 232, would violate the rule of not repeating digits within a cage.\n\n![Sudoku grid, with three killer cages that are marked as grouped together.\nThe first killer cage is in the 3\u00d73 box in the top left corner of the grid.\nThe middle column of that box forms the cage, with the followings cells from top to bottom: first cell contains a 1 and a pencil mark of 7, indicating a cage sum of 7, second cell contains a 2, third cell contains a 5.\nThe numbers are highlighted in red to indicate a mistake.\nThe second killer cage is in the central 3\u00d73 box of the grid.\nThe middle column of that box forms the cage, with the followings cells from top to bottom: first cell contains a 1 and a pencil mark of 7, indicating a cage sum of 7, second cell contains a 2, third cell contains a 4.\nNone of the numbers in this cage are highlighted and therefore don't contain any mistakes.\nThe third killer cage follows the outside corner of the central 3\u00d73 box of the grid.\nIt is made up of the following three cells: the top left cell of the cage contains a 2, highlighted in red, and a cage sum of 7.\nThe top right cell of the cage contains a 3.\nThe bottom right cell of the cage contains a 2, highlighted in red. All other cells are empty.][one-solution-img]\n\n## Example 2: Cage with several combinations\n\nIn a 2-digit cage with a sum 10, there are 4 possible combinations:\n\n- 19\n- 28\n- 37\n- 46\n\n![Sudoku grid, all squares empty except for the middle column, column 5, which has 8 rows filled.\nEach continguous two rows form a killer cage and are marked as grouped together.\nFrom top to bottom: first group is a cell with value 1 and a pencil mark indicating a cage sum of 10, cell with value 9.\nSecond group is a cell with value 2 and a pencil mark of 10, cell with value 8.\nThird group is a cell with value 3 and a pencil mark of 10, cell with value 7.\nFourth group is a cell with value 4 and a pencil mark of 10, cell with value 6.\nThe last cell in the column is empty.][four-solutions-img]\n\n## Example 3: Cage with several combinations that is restricted\n\nIn a 2-digit cage with a sum 10, where the column already contains a 1 and a 4, there are 2 possible combinations:\n\n- 28\n- 37\n\n19 and 46 are not possible due to the 1 and 4 in the column according to standard Sudoku rules.\n\n![Sudoku grid, all squares empty except for the middle column, column 5, which has 8 rows filled.\nThe first row contains a 4, the second is empty, and the third contains a 1.\nThe 1 is highlighted in red to indicate a mistake.\nThe last 6 rows in the column form killer cages of two cells each.\nFrom top to bottom: first group is a cell with value 2 and a pencil mark indicating a cage sum of 10, cell with value 8.\nSecond group is a cell with value 3 and a pencil mark of 10, cell with value 7.\nThird group is a cell with value 1, highlighted in red, and a pencil mark of 10, cell with value 9.][not-possible-img]\n\n## Trying it yourself\n\nIf you want to give an approachable Killer Sudoku a go, you can try out [this puzzle][clover-puzzle] by Clover, featured by [Mark Goodliffe on Cracking The Cryptic on the 21st of June 2021][goodliffe-video].\n\nYou can also find Killer Sudokus in varying difficulty in numerous newspapers, as well as Sudoku apps, books and websites.\n\n## Credit\n\nThe screenshots above have been generated using [F-Puzzles.com](https://www.f-puzzles.com/), a Puzzle Setting Tool by Eric Fox.\n\n[sudoku-rules]: https://masteringsudoku.com/sudoku-rules-beginners/\n[killer-guide]: https://masteringsudoku.com/killer-sudoku/\n[one-solution-img]: https://assets.exercism.org/images/exercises/killer-sudoku-helper/example1.png\n[four-solutions-img]: https://assets.exercism.org/images/exercises/killer-sudoku-helper/example2.png\n[not-possible-img]: https://assets.exercism.org/images/exercises/killer-sudoku-helper/example3.png\n[clover-puzzle]: https://app.crackingthecryptic.com/sudoku/HqTBn3Pr6R\n[goodliffe-video]: https://youtu.be/c_NjEbFEeW0?t=1180\n\n----\nUse the instructions above to modify the supplied files: killer-sudoku-helper.js\nDon't change the names of existing functions or classes, as they may be referenced from other code like unit tests.\nOnly use standard libraries; don't install additional packages.\n", "memory": "4g", "runnable": false, "difficulty": "medium", "language": "javascript", "cpus": 1, "instruction_truncated": false, "category": "coding-exercises", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "aider_polyglot", "tags": ["aider_polyglot", "exercise:killer-sudoku-helper", "javascript"]}, "runs": []}