{"group":{"group":{"id":51,"name":"Paper-\u0026-pencil Games","lockable":false,"created_at":"2019-11-19T20:26:08.000Z","updated_at":"2026-04-06T14:01:22.000Z","description":"While these games can be played with paper and pencil, Matlab is much faster at winning.","is_default":false,"created_by":26769,"badge_id":62,"featured":false,"trending":false,"solution_count_in_trending_period":1,"trending_last_calculated":"2026-04-06T00:00:00.000Z","image_id":560,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWhile these games can be played with paper and pencil, Matlab is much faster at winning.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}","description_html":"\u003cdiv style = \"text-align: start; line-height: normal; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; perspective-origin: 289.5px 21px; transform-origin: 289.5px 21px; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; perspective-origin: 266.5px 21px; transform-origin: 266.5px 21px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWhile these games can be played with paper and pencil, Matlab is much faster at winning.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","published_at":"2019-11-19T20:28:32.000Z"},"current_player":null},"problems":[{"id":44630,"title":"Guess the number I'm thinking of (Part 1)","description":"In this game you are competing against two other people to guess the number that I'm thinking of.\r\nI randomly choose an integer between one and ten (inclusive). I don't provide any clues about the number.\r\nYour first opponent tries to guess the number. They guess randomly.\r\nYour second opponent tries to guess the number. They also guess randomly.\r\nYou try to guess the number. But you guess strategically.\r\nThe winner is the person who guesses my chosen number, or the person who guesses closest to my chosen number. This represents a \"win\".\r\nIf two contestants are equally close, they may share the win, with such a result being declared a \"draw\". (It is a loss for the remaining contestant.) A draw is worth half as much as a win.\r\nEach person hears the guesses stated by any preceding competitors, so you will be aware of the two prior guesses (provided to you as the vector guessesOfOpponents). Moreover, each guess must be unique.\r\nIf everyone guessed randomly, each person should have an equal chance of winning.\r\nIt might seem that you're at a disadvantage, having the last opportunity to guess. But actually you have the advantage of extra knowledge.\r\nBy guessing strategically, you should be able to achieve a success rate of 45% or more, in which\r\nsuccess rate = (wins + draws/2) / games\r\n\r\nRELATED PROBLEM:  \r\nProblem 52323. Guess the number I'm thinking of (Part 2)","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 484px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 242px; transform-origin: 407px 242px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIn this game you are competing against two other people to guess the number that I'm thinking of.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003col style=\"block-size: 160px; font-family: Helvetica, Arial, sans-serif; list-style-type: decimal; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; perspective-origin: 391px 80px; transform-origin: 391px 80px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 20px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10px; text-align: left; transform-origin: 363px 10px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eI randomly choose an\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003einteger\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e between\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eone\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e and\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eten\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e (inclusive). I don't provide any clues about the number.\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10px; text-align: left; transform-origin: 363px 10px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eYour first opponent tries to guess the number. They guess randomly.\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10px; text-align: left; transform-origin: 363px 10px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eYour second opponent tries to guess the number. They also guess randomly.\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 20px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10px; text-align: left; transform-origin: 363px 10px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eYou try to guess the number. But you guess\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; \"\u003estrategically\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 40px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 20px; text-align: left; transform-origin: 363px 20px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe winner is the person who guesses my chosen number, or the person who guesses closest to my chosen number. This represents a \"win\".\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 40px; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 20px; text-align: left; transform-origin: 363px 20px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIf two contestants are equally close, they may share the win, with such a result being declared a \"draw\". (It is a loss for the remaining contestant.) A draw is worth half as much as a win.\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eEach person hears the guesses stated by any preceding competitors, so you will be aware of the two prior guesses (provided to you as the vector\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; \"\u003eguessesOfOpponents\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e). Moreover, each guess must be unique.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIf everyone guessed randomly, each person should have an equal chance of winning.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIt might seem that you're at a disadvantage, having the last opportunity to guess. But actually you have the advantage of extra knowledge.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eBy guessing strategically, you should be able to\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eachieve a success rate of 45% or more\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e, in which\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003esuccess rate = (wins + draws/2) / games\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eRELATED PROBLEM:  \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 20px; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; perspective-origin: 391px 10px; transform-origin: 391px 10px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 363px 10px; text-align: left; transform-origin: 363px 10px; white-space: pre-wrap; margin-left: 56px; \"\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/52323\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eProblem 52323. Guess the number I'm thinking of (Part 2)\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = myGuess(guessesOfOpponents)\r\n    y = 42;\r\nend","test_suite":"%% Anti-hacking test\r\nassessFunctionAbsence({'rng', 'RandStream'}, 'FileName','myGuess.m')\r\n\r\n%% Ensure unique guesses of integers, which are in-range\r\nfor j = 1 : 1000\r\n    numberToBeGuessed = randi(10);\r\n    gOO = randperm(10, 2);\r\n    mG = myGuess(gOO);\r\n    assert( mG \u003e= 1  \u0026  mG \u003c= 10 , 'Out of requested range.' )\r\n    u = unique( floor([gOO mG]) );\r\n    assert( length(u) == 3 , 'Your guess must not have been already chosen.' )\r\nend;\r\n\r\n%% maxIts: 20000 = Too small; 30000 = Not quite big enough; 35000 = Just big enough (usually!); 50000 = Big enough (usually!); 100000 = Big enough, plus safety margin \u0026 efficiency incentive (but waste of resources)\r\nmaxIts = 100000;    \r\ntic\r\nfor j = 1 : 10\r\n    WDL = [0 0 0];\r\n    for itn = 1 : maxIts\r\n        numberToBeGuessed = randi(10);\r\n        gOO = randperm(10, 2);\r\n        diffs = abs( [gOO myGuess(gOO)] - numberToBeGuessed );\r\n        winningContestant = find( min(diffs)==diffs );\r\n        if any( winningContestant == 3 ),\r\n            if length(winningContestant) == 1,\r\n                % Win\r\n                WDL(1) = WDL(1) + 1;  \r\n            else\r\n                % Draw\r\n                WDL(2) = WDL(2) + 1;  \r\n            end;\r\n        else\r\n            % Loss\r\n            WDL(3) = WDL(3) + 1;  \r\n        end;\r\n    end;\r\n    successRate = (WDL(1) + WDL(2)/2) / maxIts\r\n    assert( successRate \u003e= 0.45 )\r\nend;\r\ntoc","published":true,"deleted":false,"likes_count":13,"comments_count":6,"created_by":64439,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":69,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2018-05-04T14:00:17.000Z","updated_at":"2026-02-06T20:26:39.000Z","published_at":"2018-05-05T12:29:22.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn this game you are competing against two other people to guess the number that I'm thinking of.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"2\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eI randomly choose an\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003einteger\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e between\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eone\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eten\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (inclusive). I don't provide any clues about the number.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"2\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour first opponent tries to guess the number. They guess randomly.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"2\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour second opponent tries to guess the number. They also guess randomly.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"2\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou try to guess the number. But you guess\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003estrategically\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"2\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe winner is the person who guesses my chosen number, or the person who guesses closest to my chosen number. This represents a \\\"win\\\".\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"2\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf two contestants are equally close, they may share the win, with such a result being declared a \\\"draw\\\". (It is a loss for the remaining contestant.) A draw is worth half as much as a win.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEach person hears the guesses stated by any preceding competitors, so you will be aware of the two prior guesses (provided to you as the vector\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eguessesOfOpponents\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e). Moreover, each guess must be unique.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf everyone guessed randomly, each person should have an equal chance of winning.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIt might seem that you're at a disadvantage, having the last opportunity to guess. But actually you have the advantage of extra knowledge.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBy guessing strategically, you should be able to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eachieve a success rate of 45% or more\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, in which\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003esuccess rate = (wins + draws/2) / games\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRELATED PROBLEM:  \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/52323\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProblem 52323. Guess the number I'm thinking of (Part 2)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":43018,"title":"Sudoku square","description":"We have a small Sudoku square, but one number is missing.\r\n\r\n x = [ 1 5 4\r\n       8 6 3\r\n       0 9 7 ]\r\n\r\nMake a function, where output is filled small Sudoku square\r\n\r\n y = [ 1 5 4\r\n       8 6 3\r\n       2 9 7 ]","description_html":"\u003cp\u003eWe have a small Sudoku square, but one number is missing.\u003c/p\u003e\u003cpre\u003e x = [ 1 5 4\r\n       8 6 3\r\n       0 9 7 ]\u003c/pre\u003e\u003cp\u003eMake a function, where output is filled small Sudoku square\u003c/p\u003e\u003cpre\u003e y = [ 1 5 4\r\n       8 6 3\r\n       2 9 7 ]\u003c/pre\u003e","function_template":"function y = sudoku(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx=[ 1 5 4;\r\n    8 6 3;\r\n    0 9 7];\r\ny_correct=[ 1 5 4;\r\n    8 6 3;\r\n    2 9 7];\r\nassert(isequal(sudoku(x),y_correct))\r\n\r\n\r\n%%\r\nx=[ 8 3 0;\r\n    2 7 1;\r\n    5 4 6];\r\ny_correct=[ 8 3 9;\r\n    2 7 1;\r\n    5 4 6];\r\nassert(isequal(sudoku(x),y_correct))","published":true,"deleted":false,"likes_count":34,"comments_count":0,"created_by":90955,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":443,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-10-04T14:01:29.000Z","updated_at":"2026-03-11T12:58:58.000Z","published_at":"2016-10-04T14:01:29.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe have a small Sudoku square, but one number is missing.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ x = [ 1 5 4\\n       8 6 3\\n       0 9 7 ]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eMake a function, where output is filled small Sudoku square\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ y = [ 1 5 4\\n       8 6 3\\n       2 9 7 ]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":141,"title":"Solve the Sudoku Row","description":"*Description*\r\n\r\nA simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The task is, given the row (or column or square) of a Sudoku puzzle with only a single number missing, fill in the missing number and return a completed row.\r\n\r\nFor more information regarding Sudoku, refer to the \u003chttp://en.wikipedia.org/wiki/Sudoku Wikipedia Entry for Sudoku\u003e.\r\n\r\nThe input will be in the form of a vector (row or column) or a 9x9 matrix and the output has to have the same dimensionality as the input. Blank entries are signified with the number 0. There will always be one and only one blank entry in the input.\r\n\r\n*Example*\r\n\r\n     input  = [ 1 2 3 4 0 6 7 8 9 ];\r\n     output = [ 1 2 3 4 5 6 7 8 9 ]; ","description_html":"\u003cp\u003e\u003cb\u003eDescription\u003c/b\u003e\u003c/p\u003e\u003cp\u003eA simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The task is, given the row (or column or square) of a Sudoku puzzle with only a single number missing, fill in the missing number and return a completed row.\u003c/p\u003e\u003cp\u003eFor more information regarding Sudoku, refer to the \u003ca href=\"http://en.wikipedia.org/wiki/Sudoku\"\u003eWikipedia Entry for Sudoku\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe input will be in the form of a vector (row or column) or a 9x9 matrix and the output has to have the same dimensionality as the input. Blank entries are signified with the number 0. There will always be one and only one blank entry in the input.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample\u003c/b\u003e\u003c/p\u003e\u003cpre\u003e     input  = [ 1 2 3 4 0 6 7 8 9 ];\r\n     output = [ 1 2 3 4 5 6 7 8 9 ]; \u003c/pre\u003e","function_template":"function y = solveSudokuRow(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = [8 3 4 0 6 7 1 2 9];\r\ny_correct = [8 3 4 5 6 7 1 2 9];\r\nassert(isequal(solveSudokuRow(x),y_correct))\r\n\r\n%%\r\nx = [ 3 5 7\r\n      1 6 8\r\n      0 2 9 ];\r\ny_correct = ...\r\n    [ 3 5 7\r\n      1 6 8\r\n      4 2 9 ];\r\nassert(isequal(solveSudokuRow(x),y_correct))\r\n\r\n%%\r\nx = [ 2 8 0 7 3 9 6 5 4 ]';\r\ny_correct = [ 2 8 1 7 3 9 6 5 4 ]';\r\nassert(isequal(solveSudokuRow(x),y_correct))","published":true,"deleted":false,"likes_count":18,"comments_count":5,"created_by":134,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1062,"test_suite_updated_at":"2012-01-28T09:25:14.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-01-28T09:25:14.000Z","updated_at":"2026-04-07T18:21:21.000Z","published_at":"2012-01-28T09:25:14.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDescription\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The task is, given the row (or column or square) of a Sudoku puzzle with only a single number missing, fill in the missing number and return a completed row.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor more information regarding Sudoku, refer to the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Sudoku\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eWikipedia Entry for Sudoku\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe input will be in the form of a vector (row or column) or a 9x9 matrix and the output has to have the same dimensionality as the input. Blank entries are signified with the number 0. There will always be one and only one blank entry in the input.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[     input  = [ 1 2 3 4 0 6 7 8 9 ];\\n     output = [ 1 2 3 4 5 6 7 8 9 ];]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":114,"title":"Check to see if a Sudoku Puzzle is Solved","description":"*Description:*\r\n\r\nYour task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integers represents a completed sudoku puzzle. For more information regarding sudokus, refer to the \u003chttp://en.wikipedia.org/wiki/Sudoku wikipedia page\u003e.\r\n\r\nThe function will return true only when it's a completed sudoku puzzle. A value of 0 refers to a blank entry.\r\n\r\n*Example:*\r\n\r\n   input = [ 8 2 4 9 5 3 6 7 1\r\n             6 3 5 8 1 7 9 2 4\r\n             7 1 9 6 2 4 8 5 3\r\n             5 8 7 2 9 1 3 4 6\r\n             1 4 2 7 3 6 5 8 9\r\n             3 9 6 4 8 5 2 1 7\r\n             2 6 1 5 4 9 7 3 8\r\n             4 7 8 3 6 2 1 9 5\r\n             9 5 3 1 7 8 4 6 2 ];\r\n   answer = true;\r\n\r\n   input = [ 8 2 4 9 5 3 6 7 1\r\n             6 3 5 8 1 7 9 2 4\r\n             7 1 9 0 2 4 8 5 3\r\n             5 8 7 2 9 1 3 4 6\r\n             1 4 2 7 3 0 5 8 9\r\n             3 9 6 4 8 5 2 1 7\r\n             2 6 1 5 4 9 7 3 8\r\n             4 7 8 3 6 2 1 9 5\r\n             9 5 3 1 7 8 4 6 2 ];\r\n    answer = false;","description_html":"\u003cp\u003e\u003cb\u003eDescription:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eYour task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integers represents a completed sudoku puzzle. For more information regarding sudokus, refer to the \u003ca href=\"http://en.wikipedia.org/wiki/Sudoku\"\u003ewikipedia page\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eThe function will return true only when it's a completed sudoku puzzle. A value of 0 refers to a blank entry.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cpre\u003e   input = [ 8 2 4 9 5 3 6 7 1\r\n             6 3 5 8 1 7 9 2 4\r\n             7 1 9 6 2 4 8 5 3\r\n             5 8 7 2 9 1 3 4 6\r\n             1 4 2 7 3 6 5 8 9\r\n             3 9 6 4 8 5 2 1 7\r\n             2 6 1 5 4 9 7 3 8\r\n             4 7 8 3 6 2 1 9 5\r\n             9 5 3 1 7 8 4 6 2 ];\r\n   answer = true;\u003c/pre\u003e\u003cpre\u003e   input = [ 8 2 4 9 5 3 6 7 1\r\n             6 3 5 8 1 7 9 2 4\r\n             7 1 9 0 2 4 8 5 3\r\n             5 8 7 2 9 1 3 4 6\r\n             1 4 2 7 3 0 5 8 9\r\n             3 9 6 4 8 5 2 1 7\r\n             2 6 1 5 4 9 7 3 8\r\n             4 7 8 3 6 2 1 9 5\r\n             9 5 3 1 7 8 4 6 2 ];\r\n    answer = false;\u003c/pre\u003e","function_template":"function TF = sudokuIsSolved(S)\r\n  TF = all(S(:));\r\nend","test_suite":"%%\r\ninput = [ 8 2 4 9 5 3 6 7 1\r\n          6 3 5 8 1 7 9 2 4\r\n          7 1 9 6 2 4 8 5 3\r\n          5 8 7 2 9 1 3 4 6\r\n          1 4 2 7 3 6 5 8 9\r\n          3 9 6 4 8 5 2 1 7\r\n          2 6 1 5 4 9 7 3 8\r\n          4 7 8 3 6 2 1 9 5\r\n          9 5 3 1 7 8 4 6 2 ];\r\nTF_correct = true;\r\nassert(isequal(sudokuIsSolved(input),TF_correct))\r\n\r\n%%\r\ninput = [ 8 2 4 9 5 3 6 7 1\r\n          6 3 5 8 1 7 9 2 4\r\n          7 1 9 6 2 4 8 5 3\r\n          5 8 7 2 9 1 3 4 6\r\n          1 4 2 7 3 6 5 8 9\r\n          3 9 6 4 8 5 2 1 7\r\n          2 6 1 5 4 9 7 3 8\r\n          4 7 8 3 6 2 1 9 5\r\n          9 5 3 1 7 8 4 2 6 ];\r\nTF_correct = false;\r\nassert(isequal(sudokuIsSolved(input),TF_correct))\r\n\r\n%%\r\ninput = [ 8 2 4 9 5 3 6 7 1\r\n          3 6 5 8 1 7 9 1 4\r\n          7 1 9 0 2 4 8 5 3\r\n          5 8 7 2 9 1 3 4 6\r\n          1 4 2 7 3 0 5 8 9\r\n          6 9 6 4 8 5 2 1 7\r\n          2 3 1 5 4 9 7 3 8\r\n          4 7 8 3 6 2 1 9 5\r\n          9 5 3 1 7 8 4 6 2 ];\r\nTF_correct = false;\r\nassert(isequal(sudokuIsSolved(input),TF_correct))\r\n\r\n%%\r\ninput = zeros(9,9);\r\nTF_correct = false;\r\nassert(isequal(sudokuIsSolved(input),TF_correct))\r\n\r\n%%\r\ninput = meshgrid(1:9,1:9);\r\nTF_correct = false;\r\nassert(isequal(sudokuIsSolved(input),TF_correct))\r\n\r\n%%\r\ninput = toeplitz([1 9:-1:2],1:9);\r\nTF_correct = false;\r\nassert(isequal(sudokuIsSolved(input),TF_correct))\r\n\r\n%%\r\ninput = [ 1 9 8 5 2 6 3 4 7\r\n          7 2 5 3 4 1 6 9 8\r\n          3 4 6 9 7 8 2 1 5\r\n          9 8 1 2 5 7 4 6 3\r\n          5 6 4 1 3 9 8 7 2\r\n          2 3 7 6 8 4 1 5 9\r\n          4 7 3 8 1 5 9 2 6\r\n          8 1 9 7 6 2 5 3 4\r\n          6 5 2 4 9 3 7 8 1 ]\r\nTF_correct = true;\r\nassert(isequal(sudokuIsSolved(input),TF_correct))","published":true,"deleted":false,"likes_count":7,"comments_count":5,"created_by":134,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":338,"test_suite_updated_at":"2012-02-11T16:33:37.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-01-27T05:13:20.000Z","updated_at":"2026-02-11T19:49:37.000Z","published_at":"2012-02-11T16:33:37.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDescription:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integers represents a completed sudoku puzzle. For more information regarding sudokus, refer to the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Sudoku\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ewikipedia page\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe function will return true only when it's a completed sudoku puzzle. A value of 0 refers to a blank entry.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[   input = [ 8 2 4 9 5 3 6 7 1\\n             6 3 5 8 1 7 9 2 4\\n             7 1 9 6 2 4 8 5 3\\n             5 8 7 2 9 1 3 4 6\\n             1 4 2 7 3 6 5 8 9\\n             3 9 6 4 8 5 2 1 7\\n             2 6 1 5 4 9 7 3 8\\n             4 7 8 3 6 2 1 9 5\\n             9 5 3 1 7 8 4 6 2 ];\\n   answer = true;\\n\\n   input = [ 8 2 4 9 5 3 6 7 1\\n             6 3 5 8 1 7 9 2 4\\n             7 1 9 0 2 4 8 5 3\\n             5 8 7 2 9 1 3 4 6\\n             1 4 2 7 3 0 5 8 9\\n             3 9 6 4 8 5 2 1 7\\n             2 6 1 5 4 9 7 3 8\\n             4 7 8 3 6 2 1 9 5\\n             9 5 3 1 7 8 4 6 2 ];\\n    answer = false;]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2085,"title":"Sudoku Solver - Standard 9x9","description":"Solve a Standard 9x9 \u003chttp://en.wikipedia.org/wiki/Sudoku Sudoku\u003e. Values 1 thru 9 occur in each row, column, and the nine non-overlapping 3x3 matrices starting at the top left corner. \u003chttp://www.free-sudoku.com/sudoku.php?dchoix=evil Sudoku practice site\u003e.\r\n\r\n*Input:* m, a 9x9 matrix of values 0 thru 9. Unknowns are 0s.\r\n\r\n*Output:* mout, a 9x9 matrix of values 1 thru 9 that satisfy Sudoku rules.\r\n\r\n*Scoring:* Time (msec) to solve the Hard Sudoku\r\n\r\n*Example:*\r\n\r\n  m         mout\r\n  390701506 398721546\r\n  042890701 542896731\r\n  106540890 176543892\r\n  820600150 829674153\r\n  400138009 457138269\r\n  031002087 631952487\r\n  065087304 965287314\r\n  703065920 713465928\r\n  204309075 284319675\r\n\r\n*Sudoku Variations:*\r\n\r\nFuture challenges will involve the Sudoku variations Diagonal, Arrow(Sums), Inequality, Irregular, and others as they present themselves.\r\n\r\n*Algorithm Spoiler:*\r\nSudoku's can be readily solved using minimal choice recursion with consistency check. A key step is an index map of all indices that have mutual value exclusion (row,col,3x3), idxmap[81,27]. Another key step is to have an Evolve function that implements all single option values determined by the idxmap. A critical performance enhancement is a Sudoku Consistency Checker that checks for illegal replications of values. Illegal placements by Evolve occur when an incorrect value is asserted into the matrix during recursion trials. The recursive solver finds an idx with minimum options based on idxmap. The values for the idx location are asserted, Evolved, Consistency Checked, and then recursion call if Consistent. When all is Consistent and no unknowns remain the Sudoku is solved. Solution times are in the milli-seconds even for Evil, minimum 17 value, Sudokus.","description_html":"\u003cp\u003eSolve a Standard 9x9 \u003ca href = \"http://en.wikipedia.org/wiki/Sudoku\"\u003eSudoku\u003c/a\u003e. Values 1 thru 9 occur in each row, column, and the nine non-overlapping 3x3 matrices starting at the top left corner. \u003ca href = \"http://www.free-sudoku.com/sudoku.php?dchoix=evil\"\u003eSudoku practice site\u003c/a\u003e.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e m, a 9x9 matrix of values 0 thru 9. Unknowns are 0s.\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e mout, a 9x9 matrix of values 1 thru 9 that satisfy Sudoku rules.\u003c/p\u003e\u003cp\u003e\u003cb\u003eScoring:\u003c/b\u003e Time (msec) to solve the Hard Sudoku\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003em         mout\r\n390701506 398721546\r\n042890701 542896731\r\n106540890 176543892\r\n820600150 829674153\r\n400138009 457138269\r\n031002087 631952487\r\n065087304 965287314\r\n703065920 713465928\r\n204309075 284319675\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eSudoku Variations:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eFuture challenges will involve the Sudoku variations Diagonal, Arrow(Sums), Inequality, Irregular, and others as they present themselves.\u003c/p\u003e\u003cp\u003e\u003cb\u003eAlgorithm Spoiler:\u003c/b\u003e\r\nSudoku's can be readily solved using minimal choice recursion with consistency check. A key step is an index map of all indices that have mutual value exclusion (row,col,3x3), idxmap[81,27]. Another key step is to have an Evolve function that implements all single option values determined by the idxmap. A critical performance enhancement is a Sudoku Consistency Checker that checks for illegal replications of values. Illegal placements by Evolve occur when an incorrect value is asserted into the matrix during recursion trials. The recursive solver finds an idx with minimum options based on idxmap. The values for the idx location are asserted, Evolved, Consistency Checked, and then recursion call if Consistent. When all is Consistent and no unknowns remain the Sudoku is solved. Solution times are in the milli-seconds even for Evil, minimum 17 value, Sudokus.\u003c/p\u003e","function_template":"function mout=sudoku_solver(m)\r\n% m is a 9x9 Sudoku array with 0 for unknown values\r\n% create mout a consistent sudoku array\r\n  mout=m;\r\nend","test_suite":"assignin('caller','score',500);\r\n%%\r\n% Test 1\r\nmstr=['012300007'; '040600010'; '078900020'; '000000040'; '100000002'; '060000000'; '080001230'; '090004060'; '300007890']; \r\n% convert string to array\r\nm=zeros(9);\r\nfor i=1:9\r\n m(i,:)=mstr(i,:)-'0'  ; \r\nend\r\n\r\ntic\r\nmout=sudoku_solver(m)\r\ntoc\r\n\r\nvalid=all(arrayfun(@(i) all(sum([mout mout']==i)),1:length(mout)));\r\nassert(valid==1)\r\n\r\nptr=find(m\u003e0);\r\nvalid2=isequal(m(ptr),mout(ptr));\r\nassert(valid2==1)\r\n\r\n%%\r\n% Test 2\r\nmstr=['000004500'; '000003600'; '432008700'; '867000000'; '000000000'; '000000417'; '001900854'; '006400000'; '003700000']; \r\n% convert string to array\r\nm=zeros(9);\r\nfor i=1:9\r\n m(i,:)=mstr(i,:)-'0'  ; \r\nend\r\n\r\ntic\r\nmout=sudoku_solver(m)\r\ntoc\r\n\r\nvalid=all(arrayfun(@(i) all(sum([mout mout']==i)),1:length(mout)));\r\nassert(valid==1)\r\n\r\nptr=find(m\u003e0);\r\nvalid2=isequal(m(ptr),mout(ptr));\r\nassert(valid2==1)\r\n\r\n%%\r\n% Test 3\r\nmstr=['120034000'; '000000056'; '000200000'; '007800002'; '600000001'; '500006300'; '000008000'; '340000000'; '000560078']; \r\n% convert string to array\r\nm=zeros(9);\r\nfor i=1:9\r\n m(i,:)=mstr(i,:)-'0'  ; \r\nend\r\n\r\ntic\r\nmout=sudoku_solver(m)\r\ntoc\r\n\r\nvalid=all(arrayfun(@(i) all(sum([mout mout']==i)),1:length(mout)));\r\nassert(valid==1)\r\n\r\nptr=find(m\u003e0);\r\nvalid2=isequal(m(ptr),mout(ptr));\r\nassert(valid2==1)\r\n\r\n\r\n%%\r\n% Timed Test on a Hard Sudoku\r\n% Non-Valid answer creates a Max score but not a fail\r\n% Hard Sudoku\r\nmstr=['005700009'; '030090010'; '100005300'; '600004700'; '040010050'; '002500001'; '004600002'; '080020040'; '200008600']; \r\n% convert string to array\r\nm=zeros(9);\r\nfor i=1:9\r\n m(i,:)=mstr(i,:)-'0'  ; \r\nend\r\n\r\ntime0=cputime;\r\n mout=sudoku_solver(m)\r\netime=(cputime-time0)*1000 % msec\r\nvalid=all(arrayfun(@(i) all(sum([mout mout']==i)),1:length(mout)));\r\nptr=find(m\u003e0);\r\nvalid2=isequal(m(ptr),mout(ptr));\r\n% Not Asserting for Valid answer\r\nif ~valid,etime=500;end\r\nif ~valid2,etime=500;end\r\nassignin('caller','score',min(500,floor(etime)));","published":true,"deleted":false,"likes_count":8,"comments_count":2,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":51,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-01-02T00:31:17.000Z","updated_at":"2025-12-15T20:03:47.000Z","published_at":"2014-01-02T01:30:54.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSolve a Standard 9x9\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Sudoku\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eSudoku\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Values 1 thru 9 occur in each row, column, and the nine non-overlapping 3x3 matrices starting at the top left corner.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.free-sudoku.com/sudoku.php?dchoix=evil\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eSudoku practice site\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e m, a 9x9 matrix of values 0 thru 9. Unknowns are 0s.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e mout, a 9x9 matrix of values 1 thru 9 that satisfy Sudoku rules.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eScoring:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Time (msec) to solve the Hard Sudoku\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[m         mout\\n390701506 398721546\\n042890701 542896731\\n106540890 176543892\\n820600150 829674153\\n400138009 457138269\\n031002087 631952487\\n065087304 965287314\\n703065920 713465928\\n204309075 284319675]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eSudoku Variations:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFuture challenges will involve the Sudoku variations Diagonal, Arrow(Sums), Inequality, Irregular, and others as they present themselves.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eAlgorithm Spoiler:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Sudoku's can be readily solved using minimal choice recursion with consistency check. A key step is an index map of all indices that have mutual value exclusion (row,col,3x3), idxmap[81,27]. Another key step is to have an Evolve function that implements all single option values determined by the idxmap. A critical performance enhancement is a Sudoku Consistency Checker that checks for illegal replications of values. Illegal placements by Evolve occur when an incorrect value is asserted into the matrix during recursion trials. The recursive solver finds an idx with minimum options based on idxmap. The values for the idx location are asserted, Evolved, Consistency Checked, and then recursion call if Consistent. When all is Consistent and no unknowns remain the Sudoku is solved. Solution times are in the milli-seconds even for Evil, minimum 17 value, Sudokus.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":1934,"title":"GJam 2014 China Rd B: Sudoku Checker","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku\u003e. Large Case.\r\n\r\nThe Goal is determine if the Sudoku square is valid. Each row and column  must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\r\n\r\n\r\n*Input:* [M], NxN matrix (3^2\u003c=N\u003c=6^2)\r\n\r\n*Output:* TF, 1=Valid, 0=Invalid\r\n\r\n*Examples:*\r\n\r\n  TF=1\r\n  5 3 4 6 7 8 9 1 2\r\n  6 7 2 1 9 5 3 4 8\r\n  1 9 8 3 4 2 5 6 7\r\n  8 5 9 7 6 1 4 2 3\r\n  4 2 6 8 5 3 7 9 1\r\n  7 1 3 9 2 4 8 5 6\r\n  9 6 1 5 3 7 2 8 4\r\n  2 8 7 4 1 9 6 3 5\r\n  3 4 5 2 8 6 1 7 9\r\n  \r\n  TF=0\r\n  5 3 4 6 7 8 9 1 2\r\n  6 7 2 1 9 5 3 4 8\r\n  1 9 8 3 4 2 5 6 7\r\n  8 5 9 7 6 1 4 2 3\r\n  4 2 6 8 999 3 7 9 1\r\n  7 1 3 9 2 4 8 5 6\r\n  9 6 1 5 3 7 2 8 4\r\n  2 8 7 4 1 9 6 3 5\r\n  3 4 5 2 8 6 1 7 9\r\n\r\n\r\n*Contest Performance:* Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\r\n","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2929486/dashboard#s=p0\"\u003eGJam 2014 China Sudoku\u003c/a\u003e. Large Case.\u003c/p\u003e\u003cp\u003eThe Goal is determine if the Sudoku square is valid. Each row and column  must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [M], NxN matrix (3^2\u0026lt;=N\u0026lt;=6^2)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e TF, 1=Valid, 0=Invalid\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eTF=1\r\n5 3 4 6 7 8 9 1 2\r\n6 7 2 1 9 5 3 4 8\r\n1 9 8 3 4 2 5 6 7\r\n8 5 9 7 6 1 4 2 3\r\n4 2 6 8 5 3 7 9 1\r\n7 1 3 9 2 4 8 5 6\r\n9 6 1 5 3 7 2 8 4\r\n2 8 7 4 1 9 6 3 5\r\n3 4 5 2 8 6 1 7 9\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eTF=0\r\n5 3 4 6 7 8 9 1 2\r\n6 7 2 1 9 5 3 4 8\r\n1 9 8 3 4 2 5 6 7\r\n8 5 9 7 6 1 4 2 3\r\n4 2 6 8 999 3 7 9 1\r\n7 1 3 9 2 4 8 5 6\r\n9 6 1 5 3 7 2 8 4\r\n2 8 7 4 1 9 6 3 5\r\n3 4 5 2 8 6 1 7 9\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eContest Performance:\u003c/b\u003e Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\u003c/p\u003e","function_template":"function TF=Sudoku_CH(m)\r\n TF=0;\r\nend","test_suite":"%%\r\nzm=[13 4 3 6 1 8 7 10 5 12 11 14 9 16 15 2 ;2 5 8 7 6 9 12 11 10 13 16 15 14 1 4 3 ;15 14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 ;16 11 10 9 4 15 14 13 8 3 2 1 12 7 6 5 ;1 8 7 10 5 12 11 14 9 16 15 2 13 4 3 6 ;6 9 12 11 10 13 16 15 14 1 4 3 2 5 8 7 ;3 2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 ;4 15 14 13 8 3 2 1 12 7 6 5 16 11 10 9 ;5 12 11 14 9 16 15 2 13 4 3 6 1 8 7 10 ;10 13 16 15 14 1 4 3 2 5 8 7 6 9 12 11 ;7 6 9 4 11 10 13 8 15 14 1 12 3 2 5 16 ;8 3 2 1 12 7 6 5 16 11 10 9 4 15 14 13 ;9 16 15 2 13 4 3 6 1 8 7 10 5 12 11 14 ;14 1 4 3 2 5 8 7 6 9 12 11 10 13 16 15 ;11 10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 ;12 7 6 5 16 11 10 9 4 15 14 13 8 3 2 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 ;20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 ;27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 ;34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 ;35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 ;12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 ;13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 ;26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 ;33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 ;4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 ;5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 ;18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 ;19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 ;32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 ;3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 28 26 13 24 11 4 33 32 19 30 17 10 ;10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 ;11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 ;24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 ;25 18 23 34 15 14 31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 ;2 7 12 35 28 21 8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 ;9 8 31 6 29 22 15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 ;16 27 26 1 36 11 22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 ;17 4 33 32 13 24 23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 ;30 5 10 3 20 19 36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 ;31 24 29 4 21 20 1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 ;8 13 18 5 34 27 14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 ;15 14 1 12 35 28 21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 ;22 33 32 7 6 17 28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 ;23 10 3 2 19 30 29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 ;36 11 16 9 26 25 6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 ;1 30 35 10 27 26 7 36 5 16 33 32 13 6 11 22 3 2 19 12 17 28 9 8 25 18 23 34 15 14 31 24 29 4 21 20 ;14 19 24 11 4 33 20 25 30 17 10 3 26 31 36 23 16 9 32 1 6 29 22 15 2 7 12 35 28 21 8 13 18 5 34 27 ;21 20 7 18 5 34 27 26 13 24 11 4 33 32 19 30 17 10 3 2 25 36 23 16 9 8 31 6 29 22 15 14 1 12 35 28 ;28 3 2 13 12 23 34 9 8 19 18 29 4 15 14 25 24 35 10 21 20 31 30 5 16 27 26 1 36 11 22 33 32 7 6 17 ;29 16 9 8 25 36 35 22 15 14 31 6 5 28 21 20 1 12 11 34 27 26 7 18 17 4 33 32 13 24 23 10 3 2 19 30 ;6 17 22 15 32 31 12 23 28 21 2 1 18 29 34 27 8 7 24 35 4 33 14 13 30 5 10 3 20 19 36 11 16 9 26 25 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[5 8 7 10 9 12 11 14 13 16 15 2 1 4 3 6 ;14 13 13 11 2 1 16 15 6 5 4 3 10 9 8 7 ;3 6 1 4 7 10 5 8 11 14 9 12 15 2 13 16 ;16 15 2 9 4 3 6 13 8 7 10 1 12 11 14 5 ;9 12 11 14 13 16 15 2 1 4 3 6 5 8 7 10 ;2 1 16 15 6 5 4 3 10 9 8 7 14 13 12 11 ;7 10 5 8 11 14 9 12 15 2 13 16 3 6 1 4 ;4 3 6 13 8 7 10 1 12 11 14 5 16 15 2 9 ;13 16 15 2 1 4 3 6 5 8 7 10 9 12 11 14 ;6 5 4 3 10 9 8 7 14 13 12 11 2 1 16 15 ;11 14 9 12 15 2 13 16 3 6 1 4 7 10 5 8 ;8 7 10 1 12 11 14 5 16 15 2 9 4 3 6 13 ;1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 2 ;10 9 8 7 14 13 12 11 2 1 16 15 6 5 4 3 ;15 2 13 16 3 6 1 4 7 10 5 8 11 14 9 12 ;12 11 14 5 16 15 2 9 4 3 6 13 8 7 10 1 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[5 12 3 14 9 16 7 2 13 4 11 6 1 8 15 10 ;6 9 4 11 10 13 8 16 14 1 12 3 2 5 16 7 ;7 10 1 16 11 14 5 4 15 2 9 8 3 6 13 12 ;8 15 2 13 12 3 6 1 16 7 10 5 4 11 14 9 ;9 16 7 2 13 4 11 6 1 8 15 10 5 12 3 14 ;10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 11 ;11 14 5 4 15 2 9 8 3 6 13 12 7 10 1 16 ;12 3 6 1 16 7 10 5 4 11 14 9 8 15 2 13 ;13 4 11 6 1 8 15 10 5 12 3 14 9 16 7 2 ;14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 15 ;15 2 9 8 3 6 13 12 7 10 1 16 11 14 5 4 ;16 7 10 5 4 11 14 9 8 15 2 13 12 3 6 1 ;1 8 15 10 5 12 3 14 9 16 7 2 13 4 11 6 ;2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 3 ;3 6 13 12 7 10 1 16 11 14 5 4 15 2 9 8 ;4 11 14 9 8 15 2 13 12 3 6 1 16 7 10 5 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 3 8 4 6 2 7 9 5 ;2 7 6 5 1 9 8 4 3 ;9 5 4 3 8 7 6 2 1 ;4 6 2 7 9 5 1 3 8 ;5 1 9 8 4 3 2 7 6 ;3 8 7 6 2 1 9 5 4 ;7 9 5 1 3 8 4 6 2 ;8 4 3 2 7 6 5 1 9 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 ;14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 ;3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 ;16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 ;23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 ;30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 ;1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 ;20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 ;9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 ;22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 ;29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 ;36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 ;7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 ;26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 29 9 14 25 6 29 34 15 20 31 12 35 4 21 ;15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 ;28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 ;35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 ;6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 ;13 18 29 4 15 2 19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 ;32 7 24 11 16 33 2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 ;21 20 31 30 23 10 27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 ;34 27 8 19 6 35 4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 ;5 22 3 26 1 36 11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 ;12 17 28 9 14 25 18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 ;19 24 35 10 21 8 25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 ;2 13 30 17 22 3 8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 ;27 26 1 36 29 16 33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 ;4 33 14 25 12 5 10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 ;11 28 9 32 7 6 17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 ;18 23 34 15 20 31 24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 ;25 30 5 16 27 14 31 36 11 22 33 20 1 6 17 28 3 26 7 12 23 34 9 32 13 18 29 4 15 2 19 24 35 10 21 8 ;8 19 36 23 28 9 14 25 6 29 34 15 20 31 12 35 4 21 26 1 18 5 10 27 32 7 24 11 16 33 2 13 30 17 22 3 ;33 32 7 6 35 22 3 2 13 12 5 28 9 8 19 18 11 34 15 14 25 24 17 4 21 20 31 30 23 10 27 26 1 36 29 16 ;10 3 20 31 18 11 16 9 26 1 24 17 22 15 32 7 30 23 28 21 2 13 36 29 34 27 8 19 6 35 4 33 14 25 12 5 ;17 34 15 2 13 12 23 4 21 8 19 18 29 10 27 14 25 24 35 16 33 20 31 30 5 22 3 26 1 36 11 28 9 32 7 6 ;24 29 4 21 26 1 30 35 10 27 32 7 36 5 16 33 2 13 6 11 22 3 8 19 12 17 28 9 14 25 18 23 34 15 20 31 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 12 7 14 5 16 11 2 9 4 15 6 13 8 3 10 ;10 13 16 3 14 2 4 7 2 5 8 11 6 9 12 15 ;15 2 5 8 3 6 9 12 7 10 13 16 11 14 1 4 ;4 11 6 9 8 15 10 13 12 3 14 1 16 7 2 5 ;5 16 11 2 9 4 15 6 13 8 3 10 1 12 7 14 ;14 1 4 7 2 5 8 11 6 9 12 15 10 13 16 3 ;3 6 9 12 7 10 13 16 11 14 1 4 15 2 5 8 ;8 15 10 13 12 3 14 1 16 7 2 5 4 11 6 9 ;9 4 15 6 13 8 3 10 1 12 7 14 5 16 11 2 ;2 5 8 11 6 9 12 15 10 13 16 3 14 1 4 7 ;7 10 13 16 11 14 1 4 15 2 5 8 3 6 9 12 ;12 3 14 1 16 7 2 5 4 11 6 9 8 15 10 13 ;13 8 3 10 1 12 7 14 5 16 11 2 9 4 15 6 ;6 9 12 15 10 13 16 3 14 1 4 7 2 5 8 11 ;11 14 1 4 15 2 5 8 3 6 9 12 7 10 13 16 ;16 7 2 5 4 11 6 9 8 15 10 13 12 3 14 1 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 ;26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 ;27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 ;22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 ;5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 ;24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 ;13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 ;32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 ;33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 ;28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 ;11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 ;30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 ;19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 ;2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 ;3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 ;34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 ;17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 ;36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 ;25 24 35 34 27 2 31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 ;8 7 30 11 16 33 14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 ;9 32 31 18 5 10 15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 ;4 15 20 19 36 29 10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 ;23 28 21 26 13 12 29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 ;6 17 22 3 14 1 12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 ;31 30 5 4 33 8 1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 ;14 13 36 17 22 3 20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 ;15 2 1 24 11 16 21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 ;10 21 26 25 6 35 16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 ;29 34 27 32 19 18 35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 ;12 23 28 9 20 7 18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 ;1 36 11 10 3 14 7 6 17 16 9 20 13 12 23 22 15 26 19 18 29 28 21 32 25 24 35 34 27 2 31 30 5 4 33 8 ;20 19 6 23 28 9 26 25 12 29 34 15 32 31 18 35 4 21 2 1 24 5 10 27 8 7 30 11 16 33 14 13 36 17 22 3 ;21 8 7 30 17 22 27 14 13 36 23 28 33 20 19 6 29 34 3 26 25 12 35 4 9 32 31 18 5 10 15 2 1 24 11 16 ;16 27 32 31 12 5 22 33 2 1 18 11 28 3 8 7 24 17 34 9 14 13 30 23 4 15 20 19 36 29 10 21 26 25 6 35 ;35 4 33 2 25 24 5 10 3 8 31 30 11 16 9 14 1 36 17 22 15 20 7 6 23 28 21 26 13 12 29 34 27 32 19 18 ;18 29 34 15 26 13 24 35 4 21 32 19 30 5 10 27 2 25 36 11 16 33 8 31 6 17 22 3 14 1 12 23 28 9 20 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 8 11 2 5 12 15 6 9 16 3 10 13 4 7 14 ;14 9 12 7 2 13 16 11 6 1 4 15 10 5 8 3 ;3 10 13 4 7 14 1 8 11 2 5 12 15 6 9 16 ;16 15 6 5 4 3 10 9 8 7 14 13 12 11 2 1 ;5 12 15 6 9 16 3 10 13 4 7 14 1 8 11 2 ;2 13 16 11 6 1 4 15 10 5 8 3 14 9 12 7 ;7 14 1 8 11 2 5 12 15 6 9 16 3 10 13 4 ;4 3 10 9 8 7 14 13 12 11 2 1 16 15 6 5 ;9 16 3 10 13 4 7 14 1 8 11 2 5 12 15 6 ;6 1 4 15 10 5 8 3 14 9 12 7 2 13 16 11 ;11 2 5 12 15 6 9 16 3 10 13 4 7 14 1 8 ;8 7 14 13 12 11 2 1 16 15 6 5 4 3 10 9 ;13 4 7 14 1 8 11 2 5 12 15 6 9 16 3 10 ;10 5 8 3 14 9 12 7 2 13 16 11 6 1 4 15 ;15 6 9 16 3 10 13 4 7 14 1 8 11 2 5 12 ;12 11 2 1 16 15 6 5 4 3 10 9 8 7 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 ;20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 ;3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 ;10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 ;11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 ;12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 ;13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 ;26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 ;9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 ;16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 ;17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 ;18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 ;19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 ;32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 ;15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 ;22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 ;23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 ;24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 ;25 18 11 34 3 32 31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 ;2 13 6 17 16 9 8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 ;21 26 31 24 35 22 27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 ;28 27 8 1 36 23 34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 ;29 4 15 14 19 12 35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 ;30 5 10 33 20 7 36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 ;31 24 17 4 9 2 1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 ;8 19 12 23 22 15 14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 ;27 32 1 30 5 28 33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 ;34 33 14 7 6 29 4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 ;35 10 21 20 25 18 5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 ;36 11 16 3 26 13 6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 ;1 30 23 10 15 8 7 36 29 16 21 14 13 6 35 22 27 20 19 12 5 28 33 26 25 18 11 34 3 32 31 24 17 4 9 2 ;14 25 18 29 28 21 20 31 24 35 34 27 26 1 30 5 4 33 32 7 36 11 10 3 2 13 6 17 16 9 8 19 12 23 22 15 ;33 2 7 36 11 34 3 8 13 6 17 4 9 14 19 12 23 10 15 20 25 18 29 16 21 26 31 24 35 22 27 32 1 30 5 28 ;4 3 20 13 12 35 10 9 26 19 18 5 16 15 32 25 24 11 22 21 2 31 30 17 28 27 8 1 36 23 34 33 14 7 6 29 ;5 16 27 26 31 24 11 22 33 32 1 30 17 28 3 2 7 36 23 34 9 8 13 6 29 4 15 14 19 12 35 10 21 20 25 18 ;6 17 22 9 32 19 12 23 28 15 2 25 18 29 34 21 8 31 24 35 4 27 14 1 30 5 10 33 20 7 36 11 16 3 26 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 3 8 1 6 2 4 9 5 ;2 1 6 5 4 9 8 7 3 ;9 5 4 3 8 7 6 2 1 ;1 6 2 4 9 5 7 3 8 ;5 4 9 8 7 3 2 1 6 ;3 8 7 6 2 1 9 5 4 ;4 9 6 7 3 8 1 6 2 ;8 7 3 2 1 6 5 4 9 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 16 3 2 13 4 7 6 1 8 11 10 5 12 15 14 ;6 13 4 15 10 1 8 3 14 5 12 7 2 9 16 11 ;11 14 1 12 15 2 5 16 3 6 9 4 7 10 13 8 ;8 7 10 5 12 11 14 9 16 15 2 13 4 3 6 1 ;13 4 7 6 1 8 11 10 5 12 15 14 9 16 3 2 ;10 1 8 3 14 5 12 7 2 9 16 11 6 13 4 15 ;15 2 5 16 3 6 9 4 7 10 13 8 11 14 1 12 ;12 11 14 9 16 15 2 13 4 3 6 1 8 7 10 5 ;1 8 11 10 5 12 15 14 9 16 3 2 13 4 7 6 ;14 5 12 7 2 9 16 11 6 13 4 15 10 1 8 3 ;3 6 9 4 7 10 13 8 11 14 1 12 15 2 5 16 ;16 15 2 13 4 3 6 1 8 7 10 5 12 11 14 9 ;5 12 15 14 9 16 3 2 13 4 7 6 1 8 11 10 ;2 9 16 11 6 13 4 15 10 1 8 3 14 5 12 7 ;7 10 13 8 11 14 1 12 15 2 5 16 3 6 9 4 ;4 3 6 1 8 7 10 5 12 11 14 9 16 15 2 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 ;22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 ;3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 ;4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 ;15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 ;21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 ;2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 ;8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 ;9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 ;20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 ;1 5 24 3 12 6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 ;7 21 10 4 18 12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 ;13 22 16 15 9 18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 ;14 23 17 6 20 19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 ;25 19 8 2 11 5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 ;6 10 4 8 17 11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 ;12 1 15 9 23 17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 ;18 2 21 20 14 23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 ;19 3 22 11 25 24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 ;5 24 13 7 16 10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 ;11 15 9 13 22 16 20 14 18 2 21 25 19 23 7 1 5 24 3 12 6 10 4 8 17 ;17 6 20 14 3 22 11 25 19 8 2 16 5 24 13 7 21 10 4 18 12 1 15 9 23 ;23 7 1 25 19 3 12 6 5 24 8 17 11 10 4 13 22 16 15 9 18 2 21 20 14 ;24 8 2 16 5 4 13 7 21 10 9 18 12 1 15 14 23 17 6 20 19 3 22 11 25 ;10 4 18 12 21 15 9 23 17 1 20 14 3 22 6 25 19 8 2 11 5 24 13 7 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 ;17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 ;8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 ;19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 ;5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 ;6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 ;22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 ;13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 ;24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 ;10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 ;11 5 14 13 12 16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 ;2 21 10 9 8 7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 ;18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 ;4 3 7 6 20 9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 ;15 19 23 17 1 20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 ;16 10 19 18 17 21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 ;7 1 15 14 13 12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 ;23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 ;9 8 12 11 25 14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 ;20 24 3 22 6 25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 ;21 15 24 23 22 1 20 4 3 2 6 25 9 8 7 11 5 14 13 12 16 10 19 18 17 ;12 6 20 19 18 17 11 25 24 23 22 16 5 4 3 2 21 10 9 8 7 1 15 14 13 ;3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 ;14 13 17 16 5 19 18 22 21 10 24 23 2 1 15 4 3 7 6 20 9 8 12 11 25 ;25 4 8 2 11 5 9 13 7 16 10 14 18 12 21 15 19 23 17 1 20 24 3 22 6 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 ;20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 ;33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 ;4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 ;35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 ;18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 ;7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 ;26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 ;3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 ;10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 ;5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 ;24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 ;13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 ;32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 ;9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 ;16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 ;11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 ;30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 ;19 6 35 34 9 26 25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 ;2 31 24 29 16 33 8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 ;15 32 1 12 5 4 21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 ;22 27 14 13 18 11 28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 ;17 10 3 20 25 30 23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 ;36 23 28 21 8 7 6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 ;25 12 5 4 15 32 31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 ;8 1 30 35 22 3 14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 ;21 2 7 18 11 10 27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 ;28 33 20 19 24 17 34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 ;23 16 9 26 31 36 29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 ;6 29 34 27 14 13 12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 ;31 18 11 10 21 2 1 24 17 16 27 8 7 30 23 22 33 14 13 36 29 28 3 20 19 6 35 34 9 26 25 12 5 4 15 32 ;14 7 36 5 28 9 20 13 6 11 34 15 26 19 12 17 4 21 32 25 18 23 10 27 2 31 24 29 16 33 8 1 30 35 22 3 ;27 8 13 24 17 16 33 14 19 30 23 22 3 20 25 36 29 28 9 26 31 6 35 34 15 32 1 12 5 4 21 2 7 18 11 10 ;34 3 26 25 30 23 4 9 32 31 36 29 10 15 2 1 6 35 16 21 8 7 12 5 22 27 14 13 18 11 28 33 20 19 24 17 ;29 22 15 32 1 6 35 28 21 2 7 12 5 34 27 8 13 18 11 4 33 14 19 24 17 10 3 20 25 30 23 16 9 26 31 36 ;12 35 4 33 20 19 18 5 10 3 26 25 24 11 16 9 32 31 30 17 22 15 2 1 36 23 28 21 8 7 6 29 34 27 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[4 3 8 7 6 2 1 9 5 ;2 1 9 5 4 3 8 7 6 ;6 5 7 9 8 1 3 2 4 ;7 6 2 1 9 5 4 3 8 ;5 4 3 8 7 6 2 1 9 ;9 8 1 3 2 4 6 5 7 ;1 9 5 4 3 8 7 6 2 ;8 7 6 2 1 9 5 4 3 ;3 2 4 6 5 7 9 8 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 9 8 4 3 2 7 6 5 ;2 7 6 5 1 9 8 4 3 ;3 5 4 6 8 7 9 2 1 ;4 3 2 7 6 5 1 9 8 ;5 1 9 8 4 3 2 7 6 ;6 8 7 9 2 1 3 5 4 ;7 6 5 1 9 8 4 3 2 ;8 4 3 2 7 6 5 1 9 ;9 2 1 3 5 4 6 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 ;7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 ;23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 ;9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 ;15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 ;16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 ;12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 ;3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 ;14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 ;20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 ;21 20 9 13 7 1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 ;17 1 10 24 23 22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 ;8 12 6 15 14 13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 ;19 18 22 16 5 24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 ;25 4 3 2 11 5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 ;1 25 14 18 12 6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 ;22 6 15 4 3 2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 ;13 17 11 20 19 18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 ;24 23 2 21 10 4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 ;5 9 8 7 16 10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 ;6 5 19 23 17 11 10 24 3 22 16 15 4 8 2 21 20 9 13 7 1 25 14 18 12 ;2 11 20 9 8 7 16 25 14 13 12 21 5 19 18 17 1 10 24 23 22 6 15 4 3 ;18 22 16 25 24 23 2 21 5 4 3 7 1 10 9 8 12 6 15 14 13 17 11 20 19 ;4 3 7 1 15 9 8 12 6 20 14 13 17 11 25 19 18 22 16 5 24 23 2 21 10 ;10 14 13 12 21 15 19 18 17 1 20 24 23 22 6 25 4 3 2 11 5 9 8 7 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 ;8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 ;21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 ;10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 ;5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 ;36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 ;7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 ;14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 ;27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 ;16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 ;11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 ;6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 ;13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 ;20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 ;33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 ;22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 ;17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 ;12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 ;19 6 29 16 21 32 25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 ;26 31 36 35 34 9 32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 ;3 14 25 30 5 10 9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 ;28 33 20 1 24 17 34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 ;23 22 15 2 13 12 29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 ;18 11 4 27 8 7 24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 ;25 12 35 22 27 2 31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 ;32 1 6 5 4 15 2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 ;9 20 31 36 11 16 15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 ;34 3 26 7 30 23 4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 ;29 28 21 8 19 18 35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 ;24 17 10 33 14 13 30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 ;31 18 5 28 33 8 1 24 11 34 3 14 7 30 17 4 9 20 13 36 23 10 15 26 19 6 29 16 21 32 25 12 35 22 27 2 ;2 7 12 11 10 21 8 13 18 17 16 27 14 19 24 23 22 33 20 25 30 29 28 3 26 31 36 35 34 9 32 1 6 5 4 15 ;15 26 1 6 17 22 21 32 7 12 23 28 27 2 13 18 29 34 33 8 19 24 35 4 3 14 25 30 5 10 9 20 31 36 11 16 ;4 9 32 13 36 29 10 15 2 19 6 35 16 21 8 25 12 5 22 27 14 31 18 11 28 33 20 1 24 17 34 3 26 7 30 23 ;35 34 27 14 25 24 5 4 33 20 31 30 11 10 3 26 1 36 17 16 9 32 7 6 23 22 15 2 13 12 29 28 21 8 19 18 ;30 23 16 3 20 19 36 29 22 9 26 25 6 35 28 15 32 31 12 5 34 21 2 1 18 11 4 27 8 7 24 17 10 33 14 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 ;2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 ;3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 ;22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 ;5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 ;6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 ;19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 ;8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 ;9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 ;28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 ;11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 ;12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 ;25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 ;14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 ;15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 ;34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 ;17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 ;18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 ;31 18 35 34 33 2 1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 ;20 13 36 17 22 9 26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 ;21 26 1 6 5 28 27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 ;4 3 32 19 12 29 10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 ;23 16 15 8 25 30 29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 ;24 11 10 27 14 7 30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 ;1 24 5 4 3 8 7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 ;26 19 6 23 28 15 32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 ;27 32 7 12 11 34 33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 ;10 9 2 25 18 35 16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 ;29 22 21 14 31 36 35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 ;30 17 16 33 20 13 36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 ;7 30 11 10 9 14 13 36 17 16 15 20 19 6 23 22 21 26 25 12 29 28 27 32 31 18 35 34 33 2 1 24 5 4 3 8 ;32 25 12 29 34 21 2 31 18 35 4 27 8 1 24 5 10 33 14 7 30 11 16 3 20 13 36 17 22 9 26 19 6 23 28 15 ;33 2 13 18 17 4 3 8 19 24 23 10 9 14 25 30 29 16 15 20 31 36 35 22 21 26 1 6 5 28 27 32 7 12 11 34 ;16 15 8 31 24 5 22 21 14 1 30 11 28 27 20 7 36 17 34 33 26 13 6 23 4 3 32 19 12 29 10 9 2 25 18 35 ;35 28 27 20 1 6 5 34 33 26 7 12 11 4 3 32 13 18 17 10 9 2 19 24 23 16 15 8 25 30 29 22 21 14 31 36 ;36 23 22 3 26 19 6 29 28 9 32 25 12 35 34 15 2 31 18 5 4 21 8 1 24 11 10 27 14 7 30 17 16 33 20 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[429 428 430 432 431 433 426 434 427 ;427 426 434 430 429 428 433 432 431 ;431 433 432 434 427 426 428 430 429 ;432 431 433 426 434 427 429 428 430 ;430 429 428 433 432 431 427 426 434 ;434 427 426 428 430 429 431 433 432 ;426 434 427 429 428 430 432 431 433 ;433 432 431 427 426 434 430 429 428 ;428 430 429 431 433 432 434 427 426 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 ;20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 ;15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 ;34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 ;29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 ;6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 ;13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 ;26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 ;21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 ;4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 ;35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 ;12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 ;19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 ;32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 ;27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 ;10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 ;5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 ;18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 ;25 18 17 28 27 14 31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 ;2 31 12 29 22 21 8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 ;33 8 19 6 23 4 3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 ;16 3 32 1 30 35 22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 ;11 10 9 26 7 36 17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 ;24 5 34 15 20 13 30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 ;31 24 23 34 33 20 1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 ;8 1 18 35 28 27 14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 ;3 14 25 12 29 10 9 20 31 18 35 16 15 26 1 24 5 23 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 ;22 9 2 7 36 5 28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 ;17 16 15 32 13 6 23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 ;30 11 4 21 26 19 36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 ;1 30 29 4 3 26 7 36 35 10 9 32 13 6 5 16 15 2 19 12 11 22 21 8 25 18 17 28 27 14 31 24 23 34 33 20 ;14 7 24 5 34 33 20 13 30 11 4 3 26 19 36 17 10 9 32 25 6 23 16 15 2 31 12 29 22 21 8 1 18 35 28 27 ;9 20 31 18 35 16 15 26 1 24 5 22 21 32 7 30 11 28 27 2 13 36 17 34 33 8 19 6 23 4 3 14 25 12 29 10 ;28 15 8 13 6 11 34 21 14 19 12 17 4 27 20 25 18 23 10 33 26 31 24 29 16 3 32 1 30 35 22 9 2 7 36 5 ;23 22 21 2 19 12 29 28 27 8 25 18 35 34 33 14 31 24 5 4 3 20 1 30 11 10 9 26 7 36 17 16 15 32 13 6 ;36 17 10 27 32 25 6 23 16 33 2 31 12 29 22 3 8 1 18 35 28 9 14 7 24 5 34 15 20 13 30 11 4 21 26 19 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 ;22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 ;18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 ;14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 ;25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 ;1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 ;2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 ;23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 ;19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 ;5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 ;6 20 9 13 12 11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 ;7 1 25 4 18 12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 ;3 22 21 5 14 8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 ;24 8 2 16 15 4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 ;10 19 23 17 11 15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 ;11 25 14 18 17 16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 ;12 6 5 9 23 17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 ;8 2 1 10 19 13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 ;4 13 7 21 20 9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 ;15 24 3 22 16 20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 ;16 5 19 23 22 21 10 24 3 2 1 15 4 8 7 6 20 9 13 12 11 25 14 18 17 ;17 11 10 14 3 22 16 15 19 8 2 21 20 24 13 7 1 25 4 18 12 6 5 9 23 ;13 7 6 15 24 18 12 11 20 4 23 17 16 25 9 3 22 21 5 14 8 2 1 10 19 ;9 18 12 1 25 14 23 17 6 5 19 3 22 11 10 24 8 2 16 15 4 13 7 21 20 ;20 4 8 2 21 25 9 13 7 1 5 14 18 12 6 10 19 23 17 11 15 24 3 22 16 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 ;14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 ;3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 ;16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 ;29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 ;36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 ;25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 ;20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 ;9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 ;22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 ;35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 ;6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 ;31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 ;26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 ;15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 ;28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 ;5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 ;12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 ;1 24 5 28 3 26 7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 ;32 7 12 17 10 33 2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 ;21 8 31 30 29 16 27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 ;34 15 14 25 6 35 4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 ;11 22 9 2 13 36 17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 ;18 23 4 27 20 19 24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 ;7 30 11 34 9 32 13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 ;2 13 18 23 16 3 8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 ;27 14 1 36 35 22 33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 ;4 21 20 31 12 5 10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 ;17 28 15 8 19 6 23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 ;24 29 10 33 26 25 30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 ;13 36 17 4 15 2 19 6 23 10 21 8 25 12 29 16 27 14 31 18 35 22 33 20 1 24 5 28 3 26 7 30 11 34 9 32 ;8 19 24 29 22 9 14 25 30 35 28 15 20 31 36 5 34 21 26 1 6 11 4 27 32 7 12 17 10 33 2 13 18 23 16 3 ;33 20 7 6 5 28 3 26 13 12 11 34 9 32 19 18 17 4 15 2 25 24 23 10 21 8 31 30 29 16 27 14 1 36 35 22 ;10 27 26 1 18 11 16 33 32 7 24 17 22 3 2 13 30 23 28 9 8 19 36 29 34 15 14 25 6 35 4 21 20 31 12 5 ;23 34 21 14 25 12 29 4 27 20 31 18 35 10 33 26 1 24 5 16 3 32 7 30 11 22 9 2 13 36 17 28 15 8 19 6 ;30 35 16 3 32 31 36 5 22 9 2 1 6 11 28 15 8 7 12 17 34 21 14 13 18 23 4 27 20 19 24 29 10 33 26 25 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ;18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 ;19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 19 18 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[7 6 8 1 9 2 4 3 5 ;2 1 3 5 4 6 8 7 9 ;9 5 4 3 8 7 6 2 1 ;1 9 2 4 3 5 7 6 8 ;5 4 6 8 7 9 2 1 3 ;3 8 7 6 2 1 9 5 4 ;4 3 5 7 6 8 1 9 2 ;8 7 9 2 1 3 5 4 6 ;6 2 1 9 5 4 3 8 7 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 ;8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 ;21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 ;34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 ;23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 ;36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 ;7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 ;14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 ;27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 ;4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 ;29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 ;6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 ;13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 ;20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 ;33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 ;10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 ;35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 ;12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 ;19 36 23 10 21 32 25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 ;26 7 24 11 22 15 32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 ;3 14 1 6 35 4 9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 ;16 33 8 13 30 29 22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 ;5 34 9 20 31 12 11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 ;18 17 28 27 2 25 24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 ;25 6 29 16 27 2 31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 ;32 13 30 17 28 21 2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 ;9 20 7 12 5 10 15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 ;22 3 14 19 36 35 28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 ;11 4 15 26 1 18 17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 ;24 23 34 33 8 31 30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 ;31 12 35 22 33 8 1 18 5 28 3 14 7 24 11 34 9 20 13 30 17 4 15 26 19 36 23 10 21 32 25 6 29 16 27 2 ;2 19 36 23 34 27 8 25 6 29 4 33 14 31 12 35 10 3 20 1 18 5 16 9 26 7 24 11 22 15 32 13 30 17 28 21 ;15 26 13 18 11 16 21 32 19 24 17 22 27 2 25 30 23 28 33 8 31 36 29 34 3 14 1 6 35 4 9 20 7 12 5 10 ;28 9 20 25 6 5 34 15 26 31 12 11 4 21 32 1 18 17 10 27 2 7 24 23 16 33 8 13 30 29 22 3 14 19 36 35 ;17 10 21 32 7 24 23 16 27 2 13 30 29 22 33 8 19 36 35 28 3 14 25 6 5 34 9 20 31 12 11 4 15 26 1 18 ;30 29 4 3 14 1 36 35 10 9 20 7 6 5 16 15 26 13 12 11 22 21 32 19 18 17 28 27 2 25 24 23 34 33 8 31 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 16 3 10 13 4 7 14 1 8 11 2 5 12 15 6 ;2 13 4 15 6 1 8 3 10 5 12 7 14 9 16 11 ;7 6 1 12 11 10 5 16 15 14 9 4 3 2 13 8 ;8 11 14 5 12 15 2 9 16 3 6 13 4 7 10 1 ;13 4 7 14 1 8 11 2 5 12 15 6 9 16 3 10 ;6 1 8 3 10 5 12 7 14 9 16 11 2 13 4 15 ;11 10 5 16 15 14 9 4 3 2 13 8 7 6 1 12 ;12 15 2 9 16 3 6 13 4 7 10 1 8 11 14 5 ;1 8 11 2 5 12 15 6 9 16 3 10 13 4 7 14 ;10 5 12 7 14 9 16 11 2 13 4 15 6 1 8 3 ;15 14 9 4 3 2 13 8 7 6 1 12 11 10 5 16 ;16 3 6 13 4 7 10 1 8 11 14 5 12 15 2 9 ;5 12 15 6 9 16 3 10 13 4 7 14 1 8 11 2 ;14 9 16 11 2 13 4 15 6 1 8 3 10 5 12 7 ;3 2 13 8 7 6 1 12 11 10 5 16 15 14 9 4 ;4 7 10 1 8 11 14 5 12 15 2 9 16 3 6 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 ;22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 ;3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 ;4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 ;10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 ;6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 ;2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 ;8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 ;9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 ;15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 ;11 5 19 23 22 16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 ;7 21 15 24 18 12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 ;13 12 6 10 4 18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 ;14 8 2 1 25 19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 ;20 9 3 17 16 25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 ;16 10 24 3 2 21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 ;12 1 20 4 23 17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 ;18 17 11 15 9 23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 ;19 13 7 6 5 24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 ;25 14 8 22 21 5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 ;21 15 4 8 7 1 20 9 13 12 6 25 14 18 17 11 5 19 23 22 16 10 24 3 2 ;17 6 25 9 3 22 11 5 14 8 2 16 10 19 13 7 21 15 24 18 12 1 20 4 23 ;23 22 16 20 14 3 2 21 25 19 8 7 1 5 24 13 12 6 10 4 18 17 11 15 9 ;24 18 12 11 10 4 23 17 16 15 9 3 22 21 20 14 8 2 1 25 19 13 7 6 5 ;5 19 13 2 1 10 24 18 7 6 15 4 23 12 11 20 9 3 17 16 25 14 8 22 21 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[13 8 15 6 1 12 3 10 5 16 7 14 9 4 11 2 ;14 5 4 3 2 9 8 7 6 13 12 11 10 1 16 15 ;7 2 9 12 11 6 13 16 15 10 1 4 3 14 5 8 ;16 11 10 1 4 15 14 5 8 3 2 9 12 7 6 13 ;1 12 3 10 5 16 7 14 9 4 11 2 13 8 15 6 ;2 9 8 7 6 13 12 11 10 1 16 15 14 5 4 3 ;11 6 13 16 15 10 1 4 3 14 5 8 7 2 9 12 ;4 15 14 5 8 3 2 9 12 7 6 13 16 11 10 1 ;5 16 7 14 9 4 11 2 13 8 15 6 1 12 3 10 ;6 13 12 11 10 1 16 15 14 5 4 3 2 9 8 7 ;15 10 1 4 3 14 5 8 7 2 10 12 11 6 13 16 ;8 3 2 9 12 7 6 13 16 11 10 1 4 15 14 5 ;9 4 11 2 13 8 15 6 1 12 3 10 5 16 7 14 ;10 1 16 15 14 5 4 3 2 9 8 7 6 13 12 11 ;3 14 5 8 7 2 9 12 11 6 13 16 15 10 1 4 ;12 7 6 13 16 11 10 1 4 15 14 5 8 3 2 9 ];\r\nvexp=0\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 ;7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 ;8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 ;19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 ;20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 ;1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 ;12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 ;13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 ;24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 ;25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 ;6 10 9 23 2 11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 ;17 1 20 24 8 22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 ;18 22 16 25 19 23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 ;4 13 7 11 15 9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 ;5 14 3 12 21 10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 ;11 15 14 3 7 16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 ;22 6 25 4 13 2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 ;23 2 21 5 24 3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 ;9 18 12 16 20 14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 ;10 19 8 17 1 15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 ;16 20 19 8 12 21 25 24 13 17 1 5 4 18 22 6 10 9 23 2 11 15 14 3 7 ;2 11 5 9 18 7 16 10 14 23 12 21 15 19 3 17 1 20 24 8 22 6 25 4 13 ;3 7 1 10 4 8 12 6 15 9 13 17 11 20 14 18 22 16 25 19 23 2 21 5 24 ;14 23 17 21 25 19 3 22 1 5 24 8 2 6 10 4 13 7 11 15 9 18 12 16 20 ;15 24 13 22 6 20 4 18 2 11 25 9 23 7 16 5 14 3 12 21 10 19 8 17 1 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[9 8 7 6 13 12 11 10 1 16 15 14 5 4 3 2 ;14 1 4 11 2 5 8 15 6 9 12 3 10 13 16 7 ;3 2 5 16 7 6 9 4 11 10 13 8 15 14 1 12 ;12 15 10 13 16 3 14 1 4 7 2 5 8 11 6 9 ;13 12 11 10 1 16 15 14 5 4 3 2 9 8 7 6 ;2 5 8 15 6 9 12 3 10 13 16 7 14 1 4 11 ;7 6 9 4 11 10 13 8 15 14 1 12 3 2 5 16 ;16 3 14 1 4 7 2 5 8 11 6 9 12 15 10 13 ;1 16 15 14 5 4 3 2 9 8 7 6 13 12 11 10 ;6 9 12 3 10 13 16 7 14 1 4 11 2 5 8 15 ;11 10 13 8 15 14 1 12 3 2 5 16 7 6 9 4 ;4 7 2 5 8 11 6 9 12 15 10 13 16 3 14 1 ;5 4 3 2 9 8 7 6 13 12 11 10 1 16 15 14 ;10 13 16 7 14 1 4 11 2 5 8 15 6 9 12 3 ;15 14 1 12 3 2 5 16 7 6 9 4 11 10 13 8 ;8 11 6 9 12 15 10 13 16 3 14 1 4 7 2 5 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))\r\n%%\r\nzm=[1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 ;8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 ;9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 ;16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 ;35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 ;36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 ;7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 ;14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 ;15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 ;22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 ;5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 ;6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 ;13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 ;20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 ;21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 ;28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 ;11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 ;12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 ;19 24 35 22 15 20 25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 ;26 1 30 11 28 33 32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 ;27 8 25 36 5 10 33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 ;34 9 14 13 12 29 4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 ;17 16 21 2 31 6 23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 ;18 23 4 3 32 7 24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 ;25 30 5 28 21 26 31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 ;32 7 36 17 34 3 2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 ;33 14 31 6 11 16 3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 ;4 15 20 19 18 35 10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 ;23 22 27 8 1 12 29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 ;24 29 10 9 2 13 30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 ;31 36 11 34 27 32 1 6 17 4 33 2 7 12 23 10 3 8 13 18 29 16 9 14 19 24 35 22 15 20 25 30 5 28 21 26 ;2 13 6 23 4 9 8 19 12 29 10 15 14 25 18 35 16 21 20 31 24 5 22 27 26 1 30 11 28 33 32 7 36 17 34 3 ;3 20 1 12 17 22 9 26 7 18 23 28 15 32 13 24 29 34 21 2 19 30 35 4 27 8 25 36 5 10 33 14 31 6 11 16 ;10 21 26 25 24 5 16 27 32 31 30 11 22 33 2 1 36 17 28 3 8 7 6 23 34 9 14 13 12 29 4 15 20 19 18 35 ;29 28 33 14 7 18 35 34 3 20 13 24 5 4 9 26 19 30 11 10 15 32 25 36 17 16 21 2 31 6 23 22 27 8 1 12 ;30 35 16 15 8 19 36 5 22 21 14 25 6 11 28 27 20 31 12 17 34 33 26 1 18 23 4 3 32 7 24 29 10 9 2 13 ];\r\nvexp=1\r\nv=Sudoku_CH(zm);\r\nassert(isequal(v,vexp))","published":true,"deleted":false,"likes_count":4,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":66,"test_suite_updated_at":"2013-10-14T05:18:15.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-10-14T02:09:35.000Z","updated_at":"2025-12-15T20:06:09.000Z","published_at":"2013-10-14T02:26:56.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis Challenge is derived from\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contest/2929486/dashboard#s=p0\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 China Sudoku\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Large Case.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Goal is determine if the Sudoku square is valid. Each row and column must contain 1:N, for an NxN matix. Nroot=N^.5. Each NrootxNroot block must contain 1:N where blocks start at [1,1+Nroot,...] in Row/Col.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [M], NxN matrix (3^2\u0026lt;=N\u0026lt;=6^2)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e TF, 1=Valid, 0=Invalid\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExamples:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[TF=1\\n5 3 4 6 7 8 9 1 2\\n6 7 2 1 9 5 3 4 8\\n1 9 8 3 4 2 5 6 7\\n8 5 9 7 6 1 4 2 3\\n4 2 6 8 5 3 7 9 1\\n7 1 3 9 2 4 8 5 6\\n9 6 1 5 3 7 2 8 4\\n2 8 7 4 1 9 6 3 5\\n3 4 5 2 8 6 1 7 9\\n\\nTF=0\\n5 3 4 6 7 8 9 1 2\\n6 7 2 1 9 5 3 4 8\\n1 9 8 3 4 2 5 6 7\\n8 5 9 7 6 1 4 2 3\\n4 2 6 8 999 3 7 9 1\\n7 1 3 9 2 4 8 5 6\\n9 6 1 5 3 7 2 8 4\\n2 8 7 4 1 9 6 3 5\\n3 4 5 2 8 6 1 7 9]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eContest Performance:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Best Delta Time of 7 minutes with 1146 of 2010 able to process the large data set.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":1182,"title":"Hangman (easy)","description":"What is the best letter to start a \u003chttp://en.wikipedia.org/wiki/Hangman_(game) hangman\u003e game with?\r\n\r\nYou are given a cell array with all valid N-letter words. Your output should be the letter that has the highest chance of occurring (at least once) within any randomly chosen word in this dictionary. \r\n\r\nYou can assume that words will always be in all capital letters, and the cell array will always be a row.\r\n\r\n*Example:*\r\n\r\nwords={'AAA','BED','BEG','BAD'};\r\n\r\nYou should return letter='B';\r\n\r\nnote: Letter 'B' occurrs in _three_ different words. Letter 'A', while occurring four times (counting repetitions), only appears in _two_ different words. \r\n\r\n*Follow-up:* \r\n\r\nIf you are going to be losing hours of sleep over the issue of whether choosing the letter with the highest chance of occurring within any randomly chosen word is actually the _best_ 'simple' strategy in a hangman game, then the next problem in this series - \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1184-hangman-strategy Hangman (strategy)\u003e - is for you. Go ahead and test this or a different strategy there, and the contest machinery will score it based on its performance in a series of simulated hangman games. ","description_html":"\u003cp\u003eWhat is the best letter to start a \u003ca href=\"http://en.wikipedia.org/wiki/Hangman_(game)\"\u003ehangman\u003c/a\u003e game with?\u003c/p\u003e\u003cp\u003eYou are given a cell array with all valid N-letter words. Your output should be the letter that has the highest chance of occurring (at least once) within any randomly chosen word in this dictionary.\u003c/p\u003e\u003cp\u003eYou can assume that words will always be in all capital letters, and the cell array will always be a row.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003ewords={'AAA','BED','BEG','BAD'};\u003c/p\u003e\u003cp\u003eYou should return letter='B';\u003c/p\u003e\u003cp\u003enote: Letter 'B' occurrs in \u003ci\u003ethree\u003c/i\u003e different words. Letter 'A', while occurring four times (counting repetitions), only appears in \u003ci\u003etwo\u003c/i\u003e different words.\u003c/p\u003e\u003cp\u003e\u003cb\u003eFollow-up:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eIf you are going to be losing hours of sleep over the issue of whether choosing the letter with the highest chance of occurring within any randomly chosen word is actually the \u003ci\u003ebest\u003c/i\u003e 'simple' strategy in a hangman game, then the next problem in this series - \u003ca href=\"http://www.mathworks.com/matlabcentral/cody/problems/1184-hangman-strategy\"\u003eHangman (strategy)\u003c/a\u003e - is for you. Go ahead and test this or a different strategy there, and the contest machinery will score it based on its performance in a series of simulated hangman games.\u003c/p\u003e","function_template":"function letter = hangman(words)\r\n  letter='S';\r\nend","test_suite":"%%\r\nwords={'AAA','BED','BEG','BAD'};\r\nassert(isequal(hangman(words),'B'));\r\n\r\n%%\r\nwords={'BUZZ','COZY','DOZE','FUZZ','GAZE','HAZE','JAZZ','LAZY','SIZE','ZERO','ZONE'};\r\nassert(isequal(hangman(words),'Z'));\r\n\r\n%%\r\nrng default;\r\nwords=unique(char('A'+randi(26,[100,3])-1),'rows');\r\nassert(isequal(sum(any(words==hangman(cellstr(words)'),2)),max(arrayfun(@(x)sum(any(words==x,2)),'A':'Z'))));\r\n\r\n%%\r\nrng default;\r\nwords=unique(char('A'+randi(26,[200,4])-1),'rows');\r\nassert(isequal(sum(any(words==hangman(cellstr(words)'),2)),max(arrayfun(@(x)sum(any(words==x,2)),'A':'Z'))));\r\n\r\n%%\r\nrng default;\r\nwords=unique(char('A'+randi(26,[500,5])-1),'rows');\r\nassert(isequal(sum(any(words==hangman(cellstr(words)'),2)),max(arrayfun(@(x)sum(any(words==x,2)),'A':'Z'))));\r\n","published":true,"deleted":false,"likes_count":4,"comments_count":0,"created_by":43,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":52,"test_suite_updated_at":"2013-01-08T05:17:12.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-01-07T03:59:12.000Z","updated_at":"2025-12-15T20:07:42.000Z","published_at":"2013-01-07T04:03:43.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWhat is the best letter to start a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Hangman_(game)\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehangman\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e game with?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou are given a cell array with all valid N-letter words. Your output should be the letter that has the highest chance of occurring (at least once) within any randomly chosen word in this dictionary.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou can assume that words will always be in all capital letters, and the cell array will always be a row.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ewords={'AAA','BED','BEG','BAD'};\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou should return letter='B';\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003enote: Letter 'B' occurrs in\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethree\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e different words. Letter 'A', while occurring four times (counting repetitions), only appears in\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003etwo\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e different words.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eFollow-up:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf you are going to be losing hours of sleep over the issue of whether choosing the letter with the highest chance of occurring within any randomly chosen word is actually the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ebest\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e 'simple' strategy in a hangman game, then the next problem in this series -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.mathworks.com/matlabcentral/cody/problems/1184-hangman-strategy\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHangman (strategy)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e - is for you. Go ahead and test this or a different strategy there, and the contest machinery will score it based on its performance in a series of simulated hangman games.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":1700,"title":"Solve the picross! (Easy)","description":"Solve the picross!\r\n\r\n\u003chttp://en.wikipedia.org/wiki/Nonogram\u003e\r\n\r\nThe arguments (horz and vert) are cells containing the clues, e.g:\r\n\r\nhorz = { 2, [1, 1], [] };\r\nvert = { 2, 1, 1 };\r\n\r\nmeans\r\n\r\n\u003c\u003chttp://img15.hostingpics.net/thumbs/mini_268468DemoEmptyPicross.png\u003e\u003e\r\n\r\nYou have to return the completed picross, a logical or double matrix with a 0 for a white case and a 1 for a black case. If we solve the previous example:\r\n\r\n\u003c\u003chttp://img15.hostingpics.net/thumbs/mini_676179DemoCompletedPicross.png\u003e\u003e\r\n\r\nSo, the output argument should be:\r\n\r\npicross = [ 1 1 0 ; 1 0 1 ; 0 0 0 ];\r\n\r\nHave fun!\r\n\r\nSee also:\r\n\u003chttp://www.mathworks.fr/matlabcentral/cody/problems/1701-solve-the-picross-hard\u003e","description_html":"\u003cp\u003eSolve the picross!\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://en.wikipedia.org/wiki/Nonogram\"\u003ehttp://en.wikipedia.org/wiki/Nonogram\u003c/a\u003e\u003c/p\u003e\u003cp\u003eThe arguments (horz and vert) are cells containing the clues, e.g:\u003c/p\u003e\u003cp\u003ehorz = { 2, [1, 1], [] };\r\nvert = { 2, 1, 1 };\u003c/p\u003e\u003cp\u003emeans\u003c/p\u003e\u003cimg src = \"http://img15.hostingpics.net/thumbs/mini_268468DemoEmptyPicross.png\"\u003e\u003cp\u003eYou have to return the completed picross, a logical or double matrix with a 0 for a white case and a 1 for a black case. If we solve the previous example:\u003c/p\u003e\u003cimg src = \"http://img15.hostingpics.net/thumbs/mini_676179DemoCompletedPicross.png\"\u003e\u003cp\u003eSo, the output argument should be:\u003c/p\u003e\u003cp\u003epicross = [ 1 1 0 ; 1 0 1 ; 0 0 0 ];\u003c/p\u003e\u003cp\u003eHave fun!\u003c/p\u003e\u003cp\u003eSee also: \u003ca href = \"http://www.mathworks.fr/matlabcentral/cody/problems/1701-solve-the-picross-hard\"\u003ehttp://www.mathworks.fr/matlabcentral/cody/problems/1701-solve-the-picross-hard\u003c/a\u003e\u003c/p\u003e","function_template":"function picross = solvePicross( horz, vert )\r\n  picross = zeros( length( horz ), length( vert ) );\r\nend","test_suite":"%% MEET MATT....\r\n% By Tom O'Connell (sensei69)\r\n% http://webpbn.com/index.cgi?id=12795\r\n\r\nhorz = { ...\r\n    [], [1, 1], 5, 7, [1, 3, 1, 1], ...\r\n    [2, 7], [1, 2, 2, 1], [1, 3, 2, 2], [1, 5, 4], [12, 1], ...\r\n    [12, 1], 14, 14, [2, 6], [3, 3] };\r\nvert = { ...\r\n    5, [2, 4], 7, 8, [6, 1], ...\r\n    6, 6, [4, 5], [6, 5], [5, 7], ...\r\n    [2, 2, 7], [5, 7], [3, 1, 2, 3, 1], [5, 2], 4 };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% PEACE\r\n% By shay yatim (shay3979)\r\n% http://webpbn.com/index.cgi?id=4496\r\n\r\nhorz = { ...\r\n    6, [2, 2, 2], [2, 2, 2], [1, 2, 1], [1, 4, 1], ...\r\n    [1, 6, 1], [3, 2, 3], [1, 2, 2], [2, 2, 2], 6 };\r\nvert = { ...\r\n    6, [2, 1, 1], [2, 2, 2], [1, 2, 1], 10, ...\r\n    10, [1, 2, 1], [2, 2, 2], [2, 3], 6 };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% MATLAB LOGO\r\n\r\nhorz = { ...\r\n    1, 3, [1, 2], 5, [1, 4], ...\r\n    [2, 4], [3, 4], [4, 6], [1, 6], [3, 6], ...\r\n    [7, 8], [8, 8], [5, 9], [4, 10], [6, 2], ...\r\n    [6, 2], 6, 4, 3, 2 };\r\nvert = { 1, 2, 3, 4, 5, ...\r\n    5, 7, [2, 2, 2], [2, 6], [3, 8], ...\r\n    [2, 9], [2, 11], [1, 14], 15, 13, ...\r\n    11, 7, 5, 3, 1 };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% THE INVASION HAS BEGUN\r\n\r\nhorz = { ...\r\n    [], [1, 1], [1, 1], 7, [2, 3, 2], ...\r\n    11, [1, 7, 1], [1 1 1 1], [2 2], [] };\r\nvert = { ...\r\n    [], [], 3, 2, [1 5], ...\r\n    [2, 2, 1], [4, 1], 4, [4, 1], [2, 2, 1], ...\r\n    [1, 5], 2, 3, [], [] };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% YUMMY\r\n\r\nhorz = { ...\r\n    [], 8, 14, 16, 20, ...\r\n    22, 24, 25, 22, 21, ...\r\n    19, 17, 16, 14, 15, ...\r\n    16, 18, 20, 22, 22, ...\r\n    24, 25, 26, 24, 22, ...\r\n    20, 18, 14, 8, [] };\r\nvert = { ...\r\n    [], 7, 12, 16, 18, ...\r\n    20, 22, 23, 24, 26, ...\r\n    26, 26, 28, 28, 28, ...\r\n    [12, 15], [12, 14], [11, 13], [11, 13], [10, 12], ...\r\n    [9, 11], [8, 10], [8, 10], [6, 8], [5, 7], ...\r\n    [4, 6], [3, 4], [2, 3], 1, [] };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% GOTTA CATCH 'EM ALL\r\n\r\nhorz = { ...\r\n    [4, 14, 4], [3, 10], [2, 6, 2, 3], [1, 1, 5, 6, 3, 1], [4, 3, 6, 2, 2], ...\r\n    [1, 3, 6, 2, 3], [2, 1, 2, 2, 2, 5, 1, 1], [2, 1, 2, 2, 3, 8, 2, 1], [2, 7, 5, 5, 2], [3, 4, 4, 1, 6, 1], ...\r\n    [4, 4, 1, 2, 2], [2, 2, 4, 6, 3], [1, 2, 2, 2, 1, 2, 2, 4, 1, 3], [2, 2, 2, 3, 1, 2, 4], [3, 4, 11, 5] };\r\nvert = { ...\r\n    [4, 10], [3, 1, 6, 2], [2, 1, 2, 1, 1], [1, 2, 3, 1, 2], [1, 2, 1], ...\r\n    [4, 1], [4, 1, 1], [2, 1], [2, 2, 1], [2, 2, 1], ...\r\n    [1, 1], [2, 1, 2], [4, 5, 1], 15, 15, ...\r\n    [6, 4, 2], [4, 2, 1, 1], [3, 7, 1, 1], [2, 3, 2, 1, 2], [2, 7, 2, 1], ...\r\n    [2, 10, 1], [1, 11, 1], [1, 6, 1, 2, 1], [1, 1, 2, 1, 1, 1], [1, 1, 1], ...\r\n    [4, 1, 1], [1, 3, 1, 2], [1, 2, 1, 1, 4], [1, 1, 2, 1, 5], [1, 12] };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":4,"created_by":756,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-08T17:39:27.000Z","updated_at":"2025-12-23T14:52:49.000Z","published_at":"2013-07-08T17:43:22.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.png\"}],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSolve the picross!\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Nonogram\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttp://en.wikipedia.org/wiki/Nonogram\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe arguments (horz and vert) are cells containing the clues, e.g:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ehorz = { 2, [1, 1], [] }; vert = { 2, 1, 1 };\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003emeans\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou have to return the completed picross, a logical or double matrix with a 0 for a white case and a 1 for a black case. If we solve the previous example:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSo, the output argument should be:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003epicross = [ 1 1 0 ; 1 0 1 ; 0 0 0 ];\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHave fun!\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee also:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.mathworks.fr/matlabcentral/cody/problems/1701-solve-the-picross-hard\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttp://www.mathworks.fr/matlabcentral/cody/problems/1701-solve-the-picross-hard\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"},{\"partUri\":\"/media/image1.png\",\"contentType\":\"image/png\",\"content\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEV4eHiTk5P29vaBgYGcnJzAwMC3t7eKiorS0tLt7e3b29vk5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a8RwcoGnhf6oNDD0AvGL8j/E2wC+JiXwSaAKbbatGkLjBrX13szynmtPXnKc2eCRiMGQtXxrq2hmZRuuXx6SVdPlPpopeC387sFMMIwdsyAMFAEcHuptW5oIaKYgjHBBoZ512snMeJ8g7o0DmA5jwKXRdqy9W6gfMzhd7iMOySlxq0qn/z4leR43HNQ8WrLtYi1Dz+pnjsmt/8ZsulwLgQOOeC4EyQHH5z1GUZiLNTtwAAAABJRU5ErkJggg==\"}]}"},{"id":1701,"title":"Solve the picross! (Hard)","description":"Solve the picross!\r\n\r\nhttp://en.wikipedia.org/wiki/Nonogram\r\n\r\nThe arguments (horz and vert) are cells containing the clues, e.g:\r\n\r\nhorz = { 2, [1, 1], [] }; vert = { 2, 1, 1 };\r\n\r\nmeans\r\n\r\n\u003c\u003chttp://img15.hostingpics.net/thumbs/mini_268468DemoEmptyPicross.png\u003e\u003e\r\n\r\nYou have to return the completed picross, a logical or double matrix with a 0 for a white case and a 1 for a black case. If we solve the previous example:\r\n\r\n\u003c\u003chttp://img15.hostingpics.net/thumbs/mini_676179DemoCompletedPicross.png\u003e\u003e\r\n\r\nSo, the output argument should be:\r\n\r\npicross = [ 1 1 0 ; 1 0 1 ; 0 0 0 ];\r\n\r\nYou have to do some guessings and optimize your code to pass the test suite.\r\n\r\nHave fun!\r\n\r\nSee also:\r\n\u003chttp://www.mathworks.fr/matlabcentral/cody/problems/1700-solve-the-picross-easy\u003e\r\n","description_html":"\u003cp\u003eSolve the picross!\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://en.wikipedia.org/wiki/Nonogram\"\u003ehttp://en.wikipedia.org/wiki/Nonogram\u003c/a\u003e\u003c/p\u003e\u003cp\u003eThe arguments (horz and vert) are cells containing the clues, e.g:\u003c/p\u003e\u003cp\u003ehorz = { 2, [1, 1], [] }; vert = { 2, 1, 1 };\u003c/p\u003e\u003cp\u003emeans\u003c/p\u003e\u003cimg src = \"http://img15.hostingpics.net/thumbs/mini_268468DemoEmptyPicross.png\"\u003e\u003cp\u003eYou have to return the completed picross, a logical or double matrix with a 0 for a white case and a 1 for a black case. If we solve the previous example:\u003c/p\u003e\u003cimg src = \"http://img15.hostingpics.net/thumbs/mini_676179DemoCompletedPicross.png\"\u003e\u003cp\u003eSo, the output argument should be:\u003c/p\u003e\u003cp\u003epicross = [ 1 1 0 ; 1 0 1 ; 0 0 0 ];\u003c/p\u003e\u003cp\u003eYou have to do some guessings and optimize your code to pass the test suite.\u003c/p\u003e\u003cp\u003eHave fun!\u003c/p\u003e\u003cp\u003eSee also: \u003ca href = \"http://www.mathworks.fr/matlabcentral/cody/problems/1700-solve-the-picross-easy\"\u003ehttp://www.mathworks.fr/matlabcentral/cody/problems/1700-solve-the-picross-easy\u003c/a\u003e\u003c/p\u003e","function_template":"function picross = solvePicross( horz, vert )\r\n  picross = zeros( length( horz ), length( vert ) );\r\nend","test_suite":"%% BECKHAM\r\n% From Wikipedia\r\n% http://en.wikipedia.org/wiki/File:Paint_by_numbers_Animation.gif\r\n\r\nhorz = { ...\r\n    3, 5, [3 1], [2 1], [3 3 4], ...\r\n    [2 2 7], [6 1 1], [4 2 2], [1 1], [3 1], ...\r\n    6, [2 7], [6 3 1], [1 2 2 1 1], [4 1 1 3], ...\r\n    [4 2 2], [3 3 1], [3 3], 3, [2 1] };\r\n\r\nvert = { ...\r\n    2, [1 2], [2 3], [2 3], [3 1 1], ...\r\n    [2 1 1], [1 1 1 2 2], [1 1 3 1 3], [2 6 4], [3 3 9 1], ...\r\n    [5 3 2], [3 1 2 2], [2 1 7], [3 3 2], [2 4], ...\r\n    [2 1 2], [2 2 1], [2 2], 1, 1 };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% GOT MILK?\r\n% By John Breckenridge (jbrecken)\r\n% http://webpbn.com/index.cgi?id=8169\r\n\r\nhorz = { ...\r\n    [5, 10, 6], [5, 8, 6], [5, 1, 6, 6], [5, 2, 4, 1, 6], [5, 3, 2, 3, 6], ...\r\n    [4, 4, 6], [2, 6], [1, 3, 5], [2, 1, 3, 5], [5, 2, 1, 4], ...\r\n    [1, 1, 2, 5, 4], [2, 1, 2, 5], [2, 3, 6], [3, 1, 1, 7], [4, 2, 8], ...\r\n    [5, 3, 4], [18, 2], [5, 1, 4, 1], [3, 3, 4, 1], [2, 1, 3, 1, 3], ...\r\n    [2, 1, 1, 1, 1, 2], [2, 1, 1, 1, 1], [2, 2, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 3, 1] };\r\n\r\nvert = { ...\r\n    [8, 15], [7, 12], [6, 6, 2], [6, 2, 4], [5, 2, 3, 2], ...\r\n    [4, 1, 4], [3, 1, 2, 1, 3], [1, 2, 3, 1], [2, 1, 1, 1, 2], [3, 2, 5], ...\r\n    [4, 1, 1, 1, 2], [5, 1, 1], [5, 2, 1, 1], [4, 2, 1, 3], [3, 1, 4, 1, 4], ...\r\n    [2, 2, 1, 2, 2, 2], [1, 2, 3, 3], [3, 4, 2], [3, 2, 2], [7, 3, 2, 3], ...\r\n    [9, 4, 2, 2], [16, 3, 1], [16, 3], 17, [19, 1] };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% WHERE THERE'S SMOKE\r\n% By Marcus (aanet)\r\n% http://webpbn.com/index.cgi?id=2413\r\n\r\nhorz = { ...\r\n    [1, 3, 2, 1], [1, 2, 2], [3, 4], [2, 3, 2], [2, 1, 6], ...\r\n    [2, 13, 1], [1, 1, 8], [2, 1, 1, 7], [1, 2, 2, 2, 3], [3, 1, 1, 1, 3], ...\r\n    [1, 2, 1, 1, 3], [2, 1, 1, 3], [1, 5, 5], [1, 1, 3], [4, 2], ...\r\n    [2, 2, 1, 2, 1], [2, 1, 2, 3, 2], [4, 1, 6, 1], [3, 4, 3, 2], [4, 2] };\r\n\r\nvert = { ...\r\n    [2, 2, 1], [1, 6, 4, 4], [3, 3, 1, 1, 4], [2, 2], [1, 3, 3, 3], ...\r\n    [1, 1, 1, 2, 1, 2], [2, 1, 1, 1, 1], [2, 4, 3, 3], [3, 1, 2, 3, 1], [1, 4, 2, 1], ...\r\n    [3, 1, 2], [2, 1, 1], [3, 3], [7, 4], [5, 4], ...\r\n    [3, 2, 1, 3], [3, 4, 1], [9, 2], [8, 3], [1, 8, 2] };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n\r\n%% IMMORTAL STAR\r\n\r\nhorz = { ...\r\n    75, [55, 17], [13, 31, 12], [11, 27, 10], [9, 25, 8], ...\r\n    [7, 23, 7], [6, 21, 6], [5, 20, 4], [4, 18, 3], [3, 18, 2], ...\r\n    [2, 18, 2], [1, 18, 1], [1, 18, 1], [18, 1], 18, ...\r\n    [3, 3, 1], [2, 1], [2, 4, 1], [8, 8, 1], [1, 10, 10, 2], ...\r\n    [1, 11, 12, 2], [2, 13, 13, 3], [3, 29, 4], [4, 29, 6], [5, 29, 1, 7], ...\r\n    [7, 1, 30, 18], [18, 11, 7, 11, 18], [17, 10, 5, 10, 17], [17, 9, 4, 9, 16], [16, 9, 3, 9, 16], ...\r\n    [16, 8, 3, 8, 16], [16, 8, 3, 8, 15], [16, 8, 3, 8, 15], [15, 8, 3, 8, 15], [15, 7, 3, 7, 3, 15], ...\r\n    [15, 5, 8, 3, 14, 15], [15, 15, 4, 15, 15], [15, 38, 3, 15], [15, 2, 14, 14, 3, 15], [15, 3, 13, 12, 4, 15], ...\r\n    [16, 16, 12, 4, 15], [16, 4, 11, 11, 4, 15], [16, 5, 10, 10, 5, 16], [16, 4, 10, 10, 5, 16], [17, 5, 13, 12, 5, 16], ...\r\n    [18, 5, 23, 5, 17], [18, 5, 21, 5, 17], [19, 5, 17, 5, 18], [20, 5, 12, 5, 19], [20, 5, 4, 5, 20], ...\r\n    [21, 5, 4, 21], [22, 5, 4, 22], [23, 5, 3, 23], [24, 3, 3, 24], [26, 3, 2, 26], ...\r\n    [28, 2, 2, 27], [29, 3, 3, 29], [31, 10, 30], [32, 6, 31], [35, 33] };\r\n\r\nvert = { ...\r\n    [13, 41], [11, 39], [10, 38], [9, 37], [8, 36], ...\r\n    [7, 35], [6, 35], [5, 34], [5, 34], [4, 34], ...\r\n    [4, 34], [3, 34], [3, 34], [2, 34], [2, 34], ...\r\n    [2, 7, 20], [2, 3, 16], [2, 2, 7, 15], [2, 10, 13], [2, 3, 8, 12], ...\r\n    [2, 3, 8, 10], [3, 6, 8, 9], [3, 5, 7, 7, 8], [4, 12, 7, 7, 7], [5, 23, 6, 6], ...\r\n    [6, 25, 5, 6], [7, 27, 4, 5], [8, 1, 29, 3, 5], [17, 29, 3, 4], [16, 30, 1, 3], ...\r\n    [16, 31, 2, 3], [15, 11, 14, 2, 2], [15, 9, 12, 1, 1], [15, 8, 3, 6, 2, 1], [15, 9, 2, 5, 1, 1], ...\r\n    [15, 10, 1, 6, 2], [15, 17, 6, 2], [15, 16, 6, 2], [15, 18, 5, 2], [15, 9, 2, 5, 2], ...\r\n    [15, 9, 1, 5, 2], [15, 8, 2, 6, 1], [15, 10, 12, 2, 1], [15, 11, 12, 1, 1], [16, 31, 2, 2], ...\r\n    [16, 31, 2, 3], [8, 1, 29, 2, 4], [6, 29, 2, 4], [5, 27, 3, 5], [4, 25, 4, 6], ...\r\n    [3, 24, 4, 6], [3, 12, 8, 6, 7], [2, 4, 7, 7, 8], [2, 7, 8, 9], [2, 5, 8, 10], ...\r\n    [1, 3, 9, 11], [1, 1, 11, 12], [1, 2, 9, 13], [2, 3, 4, 15], [2, 6, 18], ...\r\n    [2, 35], [2, 35], [2, 35], [3, 35], [3, 35], ...\r\n    [4, 35], [4, 35], [5, 35], [6, 36], [7, 37], ...\r\n    [7, 37], [8, 38], [9, 39], [11, 41], [14, 45] };\r\n\r\ngetseq = @(soluce) arrayfun( @(i)cellfun( 'length', regexp( char(soluce(i,:)+'0'), '1+', 'match' ) ), 1:size(soluce,1), 'Uniformoutput', false );\r\nequalseq = @(actual,expected) length(actual) == length(expected) \u0026\u0026 all( cellfun( @(a,e)length(a) == length(e) \u0026\u0026 all( a == e ), actual, expected ) );\r\nchecksoluce = @( soluce, horz, vert ) size(soluce,1) == length(horz) \u0026\u0026 size(soluce,2) == length(vert) \u0026\u0026 equalseq( getseq( soluce ), horz ) \u0026\u0026 equalseq( getseq( soluce' ), vert );\r\nassert( checksoluce( solvePicross( horz, vert ), horz, vert ) )\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":14,"created_by":756,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-08T17:51:45.000Z","updated_at":"2026-01-08T13:16:02.000Z","published_at":"2013-07-08T17:53:25.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.png\"}],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSolve the picross!\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Nonogram\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttp://en.wikipedia.org/wiki/Nonogram\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe arguments (horz and vert) are cells containing the clues, e.g:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ehorz = { 2, [1, 1], [] }; vert = { 2, 1, 1 };\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003emeans\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou have to return the completed picross, a logical or double matrix with a 0 for a white case and a 1 for a black case. If we solve the previous example:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSo, the output argument should be:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003epicross = [ 1 1 0 ; 1 0 1 ; 0 0 0 ];\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou have to do some guessings and optimize your code to pass the test suite.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHave fun!\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee also:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.mathworks.fr/matlabcentral/cody/problems/1700-solve-the-picross-easy\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttp://www.mathworks.fr/matlabcentral/cody/problems/1700-solve-the-picross-easy\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"},{\"partUri\":\"/media/image1.png\",\"contentType\":\"image/png\",\"content\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEV4eHiTk5P29vaBgYGcnJzAwMC3t7eKiorS0tLt7e3b29vk5OTJycn///9vb28AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD61b95AAAAyklEQVR42q2SSQ6FIAxAWzQxkcj976lEE5R+hojQOmw+Cxa8RwcoGnhf6oNDD0AvGL8j/E2wC+JiXwSaAKbbatGkLjBrX13szynmtPXnKc2eCRiMGQtXxrq2hmZRuuXx6SVdPlPpopeC387sFMMIwdsyAMFAEcHuptW5oIaKYgjHBBoZ512snMeJ8g7o0DmA5jwKXRdqy9W6gfMzhd7iMOySlxq0qn/z4leR43HNQ8WrLtYi1Dz+pnjsmt/8ZsulwLgQOOeC4EyQHH5z1GUZiLNTtwAAAABJRU5ErkJggg==\"}]}"},{"id":2026,"title":"Skyscrapers - Puzzle","description":"The Skyscraper puzzle challenge comes from \u003chttp://logicmastersindia.com/home/ Logic Masters India\u003e and \u003chttp://www.conceptispuzzles.com/ Games' Concept is Puzzles\u003e. \r\n\r\nCreate an NxN matrix where each row and column contains 1:N given the constraints of View_Right, View_Left, View_Down, and View_Up. A View is the number of Skyscrapers visible the given edge location. A Zero value is No Information provided.\r\n\r\n*Input:* [vr,vL,vd,vu] vectors of sizes (N,1),(N,1),(1,N),(1,N)\r\n\r\n*Output:* M  an NxN matrix\r\n\r\n*Example:*\r\n\r\n  vr=[0 0 3 0 0]';\r\n  vL=[3 0 0 1 0]';\r\n  vd=[0 0 0 0 0];\r\n  vu=[5 2 0 0 0];\r\n\r\n  M\r\n         5     4     2     1     3\r\n         4     5     1     3     2\r\n         3     2     4     5     1\r\n         2     1     3     4     5\r\n         1     3     5     2     4\r\n\r\n*Algorithm Discussion:*\r\n\r\n  1) Create permutations H and V vectors of length N of values 1:N. (N=5) [12345;12354;...54321]\r\n  2) Calc Skyscraper count from Left and Right\r\n  3) Determine subset of SkyVectors possible for each Row and Column\r\n  4) Sort the Qty of 2*N possible solutions\r\n  5) Recursion from least to most valid SkyVectors\r\n  6) In recursion verify valid overlay or return\r\n","description_html":"\u003cp\u003eThe Skyscraper puzzle challenge comes from \u003ca href = \"http://logicmastersindia.com/home/\"\u003eLogic Masters India\u003c/a\u003e and \u003ca href = \"http://www.conceptispuzzles.com/\"\u003eGames' Concept is Puzzles\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eCreate an NxN matrix where each row and column contains 1:N given the constraints of View_Right, View_Left, View_Down, and View_Up. A View is the number of Skyscrapers visible the given edge location. A Zero value is No Information provided.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e [vr,vL,vd,vu] vectors of sizes (N,1),(N,1),(1,N),(1,N)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e M  an NxN matrix\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003evr=[0 0 3 0 0]';\r\nvL=[3 0 0 1 0]';\r\nvd=[0 0 0 0 0];\r\nvu=[5 2 0 0 0];\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eM\r\n       5     4     2     1     3\r\n       4     5     1     3     2\r\n       3     2     4     5     1\r\n       2     1     3     4     5\r\n       1     3     5     2     4\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eAlgorithm Discussion:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1) Create permutations H and V vectors of length N of values 1:N. (N=5) [12345;12354;...54321]\r\n2) Calc Skyscraper count from Left and Right\r\n3) Determine subset of SkyVectors possible for each Row and Column\r\n4) Sort the Qty of 2*N possible solutions\r\n5) Recursion from least to most valid SkyVectors\r\n6) In recursion verify valid overlay or return\r\n\u003c/pre\u003e","function_template":"function m=solve_skyscrapers(vr,vL,vd,vu)\r\n m=[];\r\nend","test_suite":"%%\r\n%Games Feb 2014 #1\r\nvr=[0 0 1 0 5]'; %1\r\nvL=[0 4 4 0 0]';\r\nvd=[2 2 0 1 3];\r\nvu=[3 0 0 2 0];\r\n\r\ntic\r\nm=solve_skyscrapers(vr,vL,vd,vu)\r\ntoc\r\n\r\nnr=length(vr);\r\nnrsum=nr*(nr+1)/2;\r\nassert(nr*nrsum==sum(m(:)))\r\nassert(nr==size(m,1));\r\nassert(nr==size(m,2));\r\nassert(all(sum(m)==nrsum));\r\nassert(all(sum(m,2)==nrsum));\r\n\r\nmt=m; % view right check\r\nvz=vr;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nvz=vd; % view down check\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n\r\nmt=fliplr(m); % view Left check\r\nvz=vL;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)); % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nmt=flipud(m); % view Up check\r\nvz=vu;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n%%\r\n%Games Feb 2014 #2\r\nvr=[0 4 0 2 0]'; %2\r\nvL=[5 1 0 0 0]';\r\nvd=[0 0 3 0 0];\r\nvu=[4 1 2 0 2];\r\n\r\ntic\r\nm=solve_skyscrapers(vr,vL,vd,vu)\r\ntoc\r\n\r\nnr=length(vr);\r\nnrsum=nr*(nr+1)/2;\r\nassert(nr*nrsum==sum(m(:)))\r\nassert(nr==size(m,1));\r\nassert(nr==size(m,2));\r\nassert(all(sum(m)==nrsum));\r\nassert(all(sum(m,2)==nrsum));\r\n\r\nmt=m; % view right check\r\nvz=vr;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nvz=vd;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n\r\nmt=fliplr(m); % view right check\r\nvz=vL;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)); % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nmt=flipud(m);\r\nvz=vu;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n%%\r\n%Games Feb 2014 #3\r\nvr=[5 2 2 0 0]'; %3\r\nvL=[0 3 0 3 4]';\r\nvd=[5 0 0 0 0];\r\nvu=[0 2 0 0 0];\r\n\r\ntic\r\nm=solve_skyscrapers(vr,vL,vd,vu)\r\ntoc\r\n\r\nnr=length(vr);\r\nnrsum=nr*(nr+1)/2;\r\nassert(nr*nrsum==sum(m(:)))\r\nassert(nr==size(m,1));\r\nassert(nr==size(m,2));\r\nassert(all(sum(m)==nrsum));\r\nassert(all(sum(m,2)==nrsum));\r\n\r\nmt=m; % view right check\r\nvz=vr;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nvz=vd;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n\r\nmt=fliplr(m); % view right check\r\nvz=vL;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)); % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nmt=flipud(m);\r\nvz=vu;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n%%\r\n%Games Feb 2014 #4\r\nvr=[0 0 4 5 0]'; %4\r\nvL=[0 0 0 0 0]';\r\nvd=[2 0 2 3 0];\r\nvu=[0 0 0 0 0];\r\n\r\ntic\r\nm=solve_skyscrapers(vr,vL,vd,vu)\r\ntoc\r\n\r\nnr=length(vr);\r\nnrsum=nr*(nr+1)/2;\r\nassert(nr*nrsum==sum(m(:)))\r\nassert(nr==size(m,1));\r\nassert(nr==size(m,2));\r\nassert(all(sum(m)==nrsum));\r\nassert(all(sum(m,2)==nrsum));\r\n\r\nmt=m; % view right check\r\nvz=vr;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nvz=vd;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n\r\nmt=fliplr(m); % view right check\r\nvz=vL;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)); % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nmt=flipud(m);\r\nvz=vu;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n%%\r\n%Games Feb 2014 #5\r\nvr=[3 5 0 0 0]'; %5\r\nvL=[0 0 4 0 0]';\r\nvd=[0 0 0 0 0];\r\nvu=[2 0 1 0 2];\r\n\r\ntic\r\nm=solve_skyscrapers(vr,vL,vd,vu)\r\ntoc\r\n\r\nnr=length(vr);\r\nnrsum=nr*(nr+1)/2;\r\nassert(nr*nrsum==sum(m(:)))\r\nassert(nr==size(m,1));\r\nassert(nr==size(m,2));\r\nassert(all(sum(m)==nrsum));\r\nassert(all(sum(m,2)==nrsum));\r\n\r\nmt=m; % view right check\r\nvz=vr;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nvz=vd;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n\r\nmt=fliplr(m); % view right check\r\nvz=vL;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)); % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nmt=flipud(m);\r\nvz=vu;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n\r\n\r\n%%\r\nvr=[0 0 3 0 0]'; %Games Feb 2014 #6\r\nvL=[3 0 0 1 0]';\r\nvd=[0 0 0 0 0];\r\nvu=[5 2 0 0 0];\r\n\r\ntic\r\nm=solve_skyscrapers(vr,vL,vd,vu)\r\ntoc\r\n\r\nnr=length(vr);\r\nnrsum=nr*(nr+1)/2;\r\nassert(nr*nrsum==sum(m(:)))\r\nassert(nr==size(m,1));\r\nassert(nr==size(m,2));\r\nassert(all(sum(m)==nrsum));\r\nassert(all(sum(m,2)==nrsum));\r\n\r\nmt=m; % view right check\r\nvz=vr;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nvz=vd;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\n\r\nmt=fliplr(m); % view right check\r\nvz=vL;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(k,1);\r\n for z=2:nr\r\n  if mt(k,z)\u003eshi\r\n   shi=mt(k,z);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)); % Assert check of valid count\r\n end % if\r\nend % k\r\n\r\nmt=flipud(m);\r\nvz=vu;\r\nfor k=1:nr\r\n if vz(k)\u003e0\r\n c=1;\r\n shi=mt(1,k);\r\n for z=2:nr\r\n  if mt(z,k)\u003eshi\r\n   shi=mt(z,k);\r\n   c=c+1;\r\n  end\r\n end % z\r\n c;\r\n vz(k);\r\n assert(c==vz(k)) % Assert check of valid count\r\n end % if\r\nend % k\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-11-29T19:42:36.000Z","updated_at":"2026-01-08T14:21:06.000Z","published_at":"2013-11-29T22:09:44.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Skyscraper puzzle challenge comes from\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://logicmastersindia.com/home/\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eLogic Masters India\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.conceptispuzzles.com/\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGames' Concept is Puzzles\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCreate an NxN matrix where each row and column contains 1:N given the constraints of View_Right, View_Left, View_Down, and View_Up. A View is the number of Skyscrapers visible the given edge location. A Zero value is No Information provided.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [vr,vL,vd,vu] vectors of sizes (N,1),(N,1),(1,N),(1,N)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e M an NxN matrix\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[vr=[0 0 3 0 0]';\\nvL=[3 0 0 1 0]';\\nvd=[0 0 0 0 0];\\nvu=[5 2 0 0 0];\\n\\nM\\n       5     4     2     1     3\\n       4     5     1     3     2\\n       3     2     4     5     1\\n       2     1     3     4     5\\n       1     3     5     2     4]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eAlgorithm Discussion:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[1) Create permutations H and V vectors of length N of values 1:N. (N=5) [12345;12354;...54321]\\n2) Calc Skyscraper count from Left and Right\\n3) Determine subset of SkyVectors possible for each Row and Column\\n4) Sort the Qty of 2*N possible solutions\\n5) Recursion from least to most valid SkyVectors\\n6) In recursion verify valid overlay or return]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2358,"title":"Word Search Solver","description":"There are n words (minimum of three letters in each word) supplied with a given word search board. The answer will contain n rows where each row contains the row and column indices where the word starts followed by an integer indicating the direction of the word. The direction integer runs from 1 to 8 and starts at 12 o'clock, running clockwise. So, a word spelled to the right (normal fashion) would be indexed as a 3 and facing downward to the left (SW) would be a 6.\r\nThe first board is included here for reference:\r\n board = [\r\n  'xcupa'\r\n  'dyrng'\r\n  'osbaq'\r\n  'exbid'\r\n  'wgamv'\r\n ];\r\n\r\n words = {'aim'; 'bid'; 'cup'; 'doe'};\r\n\r\n loc_ans = [\r\n  3 4 5\r\n  4 3 3\r\n  1 2 3\r\n  2 1 5\r\n ];","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 450.933px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 225.467px; transform-origin: 407px 225.467px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 84px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 42px; text-align: left; transform-origin: 384px 42px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 365px 8px; transform-origin: 365px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThere are n words (minimum of three letters in each word) supplied with a given word search board. The answer will contain n rows where each row contains the row and column indices where the word starts followed by an integer indicating the direction of the word. The direction integer runs from 1 to 8 and starts at 12 o'clock, running clockwise. So, a word spelled to the right (normal fashion) would be indexed as a 3 and facing downward to the left (SW) would be a 6.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 143.5px 8px; transform-origin: 143.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe first board is included here for reference:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 326.933px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 163.467px; transform-origin: 404px 163.467px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 40px 8.5px; tab-size: 4; transform-origin: 40px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e board = [\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 36px 8.5px; tab-size: 4; transform-origin: 36px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 28px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 28px 8.5px; \"\u003e'xcupa'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 36px 8.5px; tab-size: 4; transform-origin: 36px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 28px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 28px 8.5px; \"\u003e'dyrng'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 36px 8.5px; tab-size: 4; transform-origin: 36px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 28px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 28px 8.5px; \"\u003e'osbaq'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 36px 8.5px; tab-size: 4; transform-origin: 36px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 28px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 28px 8.5px; \"\u003e'exbid'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 36px 8.5px; tab-size: 4; transform-origin: 36px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 28px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 28px 8.5px; \"\u003e'wgamv'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 12px 8.5px; tab-size: 4; transform-origin: 12px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e ];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 152px 8.5px; tab-size: 4; transform-origin: 152px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 40px 8.5px; transform-origin: 40px 8.5px; \"\u003e words = {\u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 20px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 20px 8.5px; \"\u003e'aim'\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e; \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 20px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 20px 8.5px; \"\u003e'bid'\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e; \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 20px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 20px 8.5px; \"\u003e'cup'\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e; \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 20px 8.5px; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 20px 8.5px; \"\u003e'doe'\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 8px 8.5px; transform-origin: 8px 8.5px; \"\u003e};\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 48px 8.5px; tab-size: 4; transform-origin: 48px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e loc_ans = [\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; tab-size: 4; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e  3 4 5\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; tab-size: 4; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e  4 3 3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; tab-size: 4; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e  1 2 3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; tab-size: 4; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e  2 1 5\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 12px 8.5px; tab-size: 4; transform-origin: 12px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e ];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function loc = WordSearch(board,words)\r\n loc = [-1 -1];\r\nend","test_suite":"%%\r\nboard = [\r\n 'xcupa';\r\n 'dyrng';\r\n 'osbaq';\r\n 'exbid';\r\n 'wgamv';\r\n];\r\nwords = {'aim'; 'bid'; 'cup'; 'doe'};\r\nloc_ans = [\r\n 3 4 5;\r\n 4 3 3;\r\n 1 2 3;\r\n 2 1 5;\r\n];\r\nassert(isequal(WordSearch(board,words),loc_ans))\r\n\r\n%%\r\nboard = [\r\n 'okeanpbirf';\r\n 'qicwnafehu';\r\n 'wniazcgame';\r\n 'egaxjelbiv';\r\n 'bnomelvmcr';\r\n];\r\nwords = {'fair'; 'game'; 'hall'; 'ice'; 'jack'; 'king'; 'lemon'};\r\nloc_ans = [\r\n 2 7 4;\r\n 3 7 3;\r\n 2 9 6;\r\n 3 3 1;\r\n 4 5 8;\r\n 1 2 5;\r\n 5 6 7;\r\n];\r\nassert(isequal(WordSearch(board,words),loc_ans))\r\n\r\n%%\r\nboard = [\r\n 'werojea';\r\n 'cafefls';\r\n 'apufrbw';\r\n 'hrleaan';\r\n 'aoltgbb';\r\n 'aoaevdr';\r\n 'mdzoece';\r\n];\r\nwords = {'able'; 'bare'; 'cafe'; 'door'; 'edge'; 'full'};\r\nloc_ans = [\r\n 4 6 1;\r\n 5 7 8;\r\n 2 1 3;\r\n 7 2 1;\r\n 7 7 8;\r\n 2 3 5;\r\n];\r\nassert(isequal(WordSearch(board,words),loc_ans))\r\n\r\n%%\r\nboard = [\r\n 'anmjwfpnyo';\r\n 'wasgijsaen';\r\n 'akigyqaekl';\r\n 'doorbellci';\r\n 'loiapucfdx';\r\n 'loepalirri';\r\n 'alzhheagle';\r\n 'mgxmsovnpr';\r\n 'aiqtbovgee';\r\n 'juyhctahnr';\r\n];\r\nwords = {'airplane'; 'board'; 'clasp'; 'doorbell'; 'eagle'; 'fiesty'; 'graph'; 'hatch'; 'igloo'; 'jigsaw'; 'key'; 'llama'};\r\nloc_ans = [\r\n 2 2 4;\r\n 9 5 2;\r\n 5 7 1;\r\n 4 1 3;\r\n 7 6 3;\r\n 5 8 6;\r\n 3 4 5;\r\n 10 8 7;\r\n 9 2 1;\r\n 2 6 7;\r\n 3 9 1;\r\n 5 1 5;\r\n];\r\nassert(isequal(WordSearch(board,words),loc_ans))","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":26769,"edited_by":223089,"edited_at":"2022-09-19T13:13:49.000Z","deleted_by":null,"deleted_at":null,"solvers_count":17,"test_suite_updated_at":"2022-09-19T13:13:50.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-06-11T13:58:10.000Z","updated_at":"2025-12-15T20:16:04.000Z","published_at":"2014-06-11T13:58:44.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere are n words (minimum of three letters in each word) supplied with a given word search board. The answer will contain n rows where each row contains the row and column indices where the word starts followed by an integer indicating the direction of the word. The direction integer runs from 1 to 8 and starts at 12 o'clock, running clockwise. So, a word spelled to the right (normal fashion) would be indexed as a 3 and facing downward to the left (SW) would be a 6.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe first board is included here for reference:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ board = [\\n  'xcupa'\\n  'dyrng'\\n  'osbaq'\\n  'exbid'\\n  'wgamv'\\n ];\\n\\n words = {'aim'; 'bid'; 'cup'; 'doe'};\\n\\n loc_ans = [\\n  3 4 5\\n  4 3 3\\n  1 2 3\\n  2 1 5\\n ];]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":3042,"title":"Fill-a-pix - Solution Checker","description":"\u003chttp://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/rules Fill-a-pix\u003e is a logic puzzle game similar to Pic-a-Pix (aka Logic art) and Minesweeper. An example starting board is shown below on the left with the completed board shown to its right. Each number in the board indicates how many surrounding cells, including itself, are to be filled in. There are (up to) nine total cells associated with each number: four immediately adjacent (up, down, left, and right), four diagonally adjacent (one touching each corner), and the central cell (where the number is located).\r\n\r\nBased on this logic, all 0's and 9's are determinant, as all nine cells are either empty or filled, respectively, for these numbers. Also, all 6's on the board edges and 4's in the corners should be completely filled in, as they only involve 6 or 4 cells, respectively.\r\n\r\n\u003c\u003chttp://www.conceptispuzzles.com/picture/11/1418.gif\u003e\u003e \r\n\r\n\u003c\u003chttp://www.conceptispuzzles.com/picture/11/1420.gif\u003e\u003e\r\n\r\nFor this problem, you will be provided with various boards and solutions to each board. Write a function to determine if the solution is correct for the given board. The board will be filled with NaN's where there are no number clues; these cells should not be checked. The solution board will be filled with 1's (filled) and 0's (empty).\r\n\r\nA related problem is \u003chttps://www.mathworks.com/matlabcentral/cody/problems/3043-fill-a-pix-solver-basic Fill-a-pix - Solver (basic)\u003e.","description_html":"\u003cp\u003e\u003ca href = \"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/rules\"\u003eFill-a-pix\u003c/a\u003e is a logic puzzle game similar to Pic-a-Pix (aka Logic art) and Minesweeper. An example starting board is shown below on the left with the completed board shown to its right. Each number in the board indicates how many surrounding cells, including itself, are to be filled in. There are (up to) nine total cells associated with each number: four immediately adjacent (up, down, left, and right), four diagonally adjacent (one touching each corner), and the central cell (where the number is located).\u003c/p\u003e\u003cp\u003eBased on this logic, all 0's and 9's are determinant, as all nine cells are either empty or filled, respectively, for these numbers. Also, all 6's on the board edges and 4's in the corners should be completely filled in, as they only involve 6 or 4 cells, respectively.\u003c/p\u003e\u003cimg src = \"http://www.conceptispuzzles.com/picture/11/1418.gif\"\u003e\u003cimg src = \"http://www.conceptispuzzles.com/picture/11/1420.gif\"\u003e\u003cp\u003eFor this problem, you will be provided with various boards and solutions to each board. Write a function to determine if the solution is correct for the given board. The board will be filled with NaN's where there are no number clues; these cells should not be checked. The solution board will be filled with 1's (filled) and 0's (empty).\u003c/p\u003e\u003cp\u003eA related problem is \u003ca href = \"https://www.mathworks.com/matlabcentral/cody/problems/3043-fill-a-pix-solver-basic\"\u003eFill-a-pix - Solver (basic)\u003c/a\u003e.\u003c/p\u003e","function_template":"function [tf] = fill_a_pix_solution_check(board,solution)\r\n\r\ntf = 1;\r\n\r\nend\r\n","test_suite":"%%\r\nboard = [-1,-1,-1,-1,-1,-1,-1,-1,0,-1; -1,8,8,-1,2,-1,0,-1,-1,-1; 5,-1,8,-1,-1,-1,-1,-1,-1,-1; -1,-1,-1,-1,-1,2,-1,-1,-1,2; 1,-1,-1,-1,4,5,6,-1,-1,-1; -1,0,-1,-1,-1,7,9,-1,-1,6; -1,-1,-1,6,-1,-1,9,-1,-1,6; -1,-1,6,6,8,7,8,7,-1,5; -1,4,-1,6,6,6,-1,6,-1,4; -1,-1,-1,-1,-1,-1,3,-1,-1,-1];\r\nboard(board==-1) = NaN;\r\nsolution = [0,1,1,0,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 0,1,1,0,0,0,0,0,0,0; 0,0,0,0,0,1,1,1,1,1; 0,0,0,1,1,1,1,1,1,1; 0,0,0,1,0,1,1,1,1,1; 0,1,1,1,1,1,1,1,1,1; 0,1,0,1,1,1,0,1,0,1; 0,0,1,0,0,0,1,0,1,0];\r\ntf_corr = 1;\r\nassert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))\r\n\r\n%%\r\nboard = [-1,2,3,-1,-1,0,-1,-1,-1,-1; -1,-1,-1,-1,3,-1,2,-1,-1,6; -1,-1,5,-1,5,3,-1,5,7,4; -1,4,-1,5,-1,5,-1,6,-1,3; -1,-1,4,-1,5,-1,6,-1,-1,3; -1,-1,-1,2,-1,5,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,1,1,0,0,0,0,0,1,1,1,1,1; 1,1,1,0,0,1,0,0,1,1,0,0,0,0,0; 1,0,0,1,0,0,1,1,1,1,0,0,0,0,0; 1,1,1,1,1,0,0,0,1,0,1,0,0,0,0; 1,1,0,0,1,0,0,0,0,1,0,1,1,0,0; 0,1,1,1,0,1,0,0,0,1,1,0,1,1,0; 0,1,1,0,0,1,1,0,0,0,1,1,0,1,0; 0,0,1,1,1,0,1,0,0,0,1,1,0,0,1];\r\ntf_corr = 0;\r\nassert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))\r\n\r\n%%\r\nboard = [-1,-1,-1,-1,-1,-1,-1,-1,0,-1; -1,8,8,-1,2,-1,0,-1,-1,-1; 5,-1,8,-1,-1,-1,-1,-1,-1,-1; -1,-1,-1,-1,-1,2,-1,-1,-1,2; 1,-1,-1,-1,4,5,6,-1,-1,-1; -1,0,-1,-1,-1,7,9,-1,-1,6; -1,-1,-1,6,-1,-1,9,-1,-1,6; -1,-1,6,6,8,7,8,7,-1,5; -1,4,-1,6,6,6,-1,6,-1,4; -1,-1,-1,-1,-1,-1,3,-1,-1,-1];\r\nboard(board==-1) = NaN;\r\nsolution = [0,1,1,0,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 0,1,1,0,0,0,0,0,0,0; 0,0,0,0,0,1,1,1,1,1; 0,0,0,1,1,1,1,1,1,1; 0,0,0,1,0,1,1,1,1,1; 0,1,1,1,1,1,1,1,1,1; 0,1,0,0,1,1,0,1,0,1; 0,0,1,0,0,0,1,0,1,0];\r\ntf_corr = 0;\r\nassert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))\r\n\r\n%%\r\nboard = [-1,2,3,-1,-1,0,-1,-1,-1,-1; -1,-1,-1,-1,3,-1,2,-1,-1,6; -1,-1,5,-1,5,3,-1,5,7,4; -1,4,-1,5,-1,5,-1,6,-1,3; -1,-1,4,-1,5,-1,6,-1,-1,3; -1,-1,-1,2,-1,5,-1,-1,-1,-1; 4,-1,1,-1,-1,-1,1,1,-1,-1; 4,-1,1,-1,-1,-1,1,-1,4,-1; -1,-1,-1,-1,6,-1,-1,-1,-1,4; -1,4,4,-1,-1,-1,-1,4,-1,-1];\r\nboard(board==-1) = NaN;\r\nsolution = [0,1,1,0,0,0,0,0,1,1; 0,0,0,1,0,0,0,1,1,1; 0,0,1,1,1,0,0,1,1,1; 0,1,1,0,1,1,0,1,0,0; 0,1,0,1,0,1,1,1,1,0; 1,1,0,0,1,1,0,0,1,1; 1,0,0,0,1,0,0,0,0,1;  1,0,0,0,1,0,0,0,0,1; 1,1,0,0,1,1,0,0,1,1; 0,1,1,1,1,1,1,1,1,0];\r\ntf_corr = 0;\r\nassert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))\r\n\r\n%%\r\nboard = [-1,-1,3,3,-1,-1,-1,-1,-1,-1; 3,-1,-1,-1,-1,-1,0,-1,0,-1; -1,-1,3,4,-1,3,-1,-1,-1,-1; 3,-1,4,-1,-1,-1,-1,3,-1,-1; 2,3,-1,5,-1,4,4,-1,-1,4; -1,-1,5,4,6,6,-1,4,-1,4; -1,-1,-1,-1,-1,3,3,-1,-1,4; -1,3,-1,-1,5,6,5,-1,-1,4; -1,-1,-1,7,-1,-1,-1,7,-1,5; -1,4,-1,-1,6,-1,6,-1,5,-1];\r\nboard(board==-1) = NaN;\r\nsolution = [0,0,1,1,0,0,0,0,0,0; 0,1,0,0,1,0,0,0,0,0; 1,1,0,0,1,0,0,0,0,0; 0,0,1,0,1,0,0,1,0,1; 0,1,0,1,1,1,1,0,1,1; 0,1,0,1,0,0,0,1,0,1; 0,1,0,0,1,1,1,0,0,1; 0,0,1,0,0,0,0,0,1,1; 0,0,1,1,1,1,1,1,1,0; 1,1,1,1,1,1,1,1,1,1];\r\ntf_corr = 1;\r\nassert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))\r\n\r\n%%\r\nboard = [-1,-1,-1,4,-1,-1,4,-1,6,-1,5,4,-1,-1,1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0,0,0,0,0,1,0,1,0,1,0];\r\ntf_corr = 1;\r\nassert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":22,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-02-25T02:55:09.000Z","updated_at":"2025-12-31T18:50:57.000Z","published_at":"2015-02-25T02:55:09.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.gif\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/media/image2.gif\"}],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/rules\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eFill-a-pix\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is a logic puzzle game similar to Pic-a-Pix (aka Logic art) and Minesweeper. An example starting board is shown below on the left with the completed board shown to its right. Each number in the board indicates how many surrounding cells, including itself, are to be filled in. There are (up to) nine total cells associated with each number: four immediately adjacent (up, down, left, and right), four diagonally adjacent (one touching each corner), and the central cell (where the number is located).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on this logic, all 0's and 9's are determinant, as all nine cells are either empty or filled, respectively, for these numbers. Also, all 6's on the board edges and 4's in the corners should be completely filled in, as they only involve 6 or 4 cells, respectively.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor this problem, you will be provided with various boards and solutions to each board. Write a function to determine if the solution is correct for the given board. The board will be filled with NaN's where there are no number clues; these cells should not be checked. The solution board will be filled with 1's (filled) and 0's (empty).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA related problem is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/3043-fill-a-pix-solver-basic\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eFill-a-pix - Solver (basic)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"},{\"partUri\":\"/media/image1.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhlACUAPcAAP///5KSkvz8/N3d3RISErS0tISEhOrq6u3t7UJCQqqqqsLCwszMzOfn55CQkP39/X5+fvn5+eHh4d7e3r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vw7stR4CUEDstm7syF7raIAGy07rFFAGz34AuT7tHXAG074XfcHcCZEKHawQrLcQ4Z4QRKDEC1HuDIEN2MAQUtCr3f7tCeEKV6lWd3vm0xqWWZWttCMDDZy4PezmtrfS0iyolxmh6coDmzAIGpAnQkri//3m7tvDaK7mBr/mUpADPoALbXCsYt5caCzx906SUpzmR1kDDdAALqB7DZ/YJQ7xH4/NIX+uif/aIjogBt/A8f59aAEfrRcMgOhK8SsMAykQAbtABVu8rqEorSLPl/leRLPgCxkIB0ff5ho42/a+9PjucztKBoTABEAgqivv2i5v4Hg78RV/9isMAAjwDPjgrf9e9QVOAPimMr9lEMGVEHePEBOm9/o+HhgGJnXPQo+98yDyroE+rwhxrwuh+AnBr/jK5wnh5wArsAlBsAthsAxh6AVBAvEQCwnw+aAf+p/vBUog+qbfA1TQA6Yv+qiv+qsP+krgBa8f+rE/+6A/CZNg+59fBYSg+wlA+r4PCvLg+0AAFQUBEjCR/Mq//Mzf/M0vEx4R/dI//dRf/dZ//dif/dq//RQCERAAOw==\"},{\"partUri\":\"/media/image2.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhlACUAPcAAAAAAP///xISEvz8/P7+/u3t7ZKSkt3d3UJCQvv7+4SEhL6+voCAgLS0tKWlpfr6+pSUlPHx8b+/v66urvDw8KmpqaysrCoqKr29vfb29uXl5cLCwsrKyurq6vLy8pycnKqqqu/v74ODg5eXl5aWlszMzGVlZaSkpKurq5iYmKKiohMTE+Hh4QUFBfj4+BAQEOfn5xEREeLi4kNDQ7KysouLiw0NDQEBAQICAt7e3sXFxZ6enn5+fgoKCujo6IeHh9DQ0M3NzePj45WVlQwMDNXV1e7u7pCQkD09PV5eXvX19Q4ODi8vL6Ojo8bGxuzs7EREREFBQSsrKwgICPPz81NTU9jY2Ovr69vb23d3dxUVFQsLC11dXaenp7CwsHJycuTk5AkJCYiIiCMjI6ioqAQEBPT09HNzc8TExIKCgtra2re3ty0tLWdnZ1xcXPf390tL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olFisLs54Y2U1HchijDWuduQAPDZ5IGlTLnnjJGMYYwsGWDjkoCdRVnljh3c6l+EzEe1MJHkZ3ZheogMwOtPUhEx6aTqFerqCQv+d/7rQJOWgwphkYLjZoJxrKprqQVOD2OWPg97VKJGSwglMH9u+CSWmg6zJbbqjDkBuk/J+k++3VXKoDis0eGBGnAEFPO+eHfr5aoKEpukqG/fimHK4tmraqrf00upNzD1nuc7QLU8SgGYY2MdJQEvXqvGDzl08pYk9FMCI2gzI4UeRWcthYM9+R/LFUqKkkUvXI991BSVqG0GD2lxLbTXWNBihNutrQ+NFH1mD5LVPagsAiittaAEJBNJXf/30M9GDffgRiOG1GOJnX49M7F8ff/3VD+W1G1yif+nTxGu2EIUBys8GhhlDURz4QAhGUIITpGAFLXhBDGZQgxuE4BjE9xtBEIZQhCMkYQlNeEIUplCFK2RhC134Qhi6MCAAOw==\"}]}"},{"id":3043,"title":"Fill-a-pix - Solver (basic)","description":"\u003chttp://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/rules Fill-a-pix\u003e is a logic puzzle game similar to Pic-a-Pix (aka Logic art) and Minesweeper. An example starting board is shown below on the left with the completed board shown to its right. Each number in the board indicates how many surrounding cells, including itself, are to be filled in. There are (up to) nine total cells associated with each number: four immediately adjacent (up, down, left, and right), four diagonally adjacent (one touching each corner), and the central cell (where the number is located).\r\n\r\nBased on this logic, all 0's and 9's are determinant, as all nine cells are either empty or filled, respectively, for these numbers. Also, all 6's on the board edges and 4's in the corners should be completely filled in, as they only involve 6 or 4 cells, respectively.\r\n\r\n\u003c\u003chttp://www.conceptispuzzles.com/picture/27/1558.gif\u003e\u003e\r\n\r\n\u003c\u003chttp://www.conceptispuzzles.com/picture/27/1574.gif\u003e\u003e\r\n\r\nThis problem deals with basic-logic Fill-a-pix problems; a sample step-by-step solution is found \u003chttp://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/techniques here\u003e. These problems are basic in that each clue can be solved independent of all other clues, though some looping or iteration over the board will be required to solve all the clues. Basic logic can be summarized in the following two cases, regarding the cells associated with each clue: (1) if the sum of filled-in cells equals the clue, all other associated cells should be marked as empty, and (2) if the sum of empty cells equals the total number of associated cells minus the clue, all other associated cells should be marked as filled in.\r\n\r\nFor this problem, you will be presented with a board full of clues. Write a function to solve the Fill-a-pix puzzle based on those clues, returning a solution of the same size as the board filled with 1's (filled) and 0's (empty).\r\n\r\nA related problem is \u003chttps://www.mathworks.com/matlabcentral/cody/problems/3042-fill-a-pix-solution-checker Fill-a-pix - Solution Checker\u003e.","description_html":"\u003cp\u003e\u003ca href = \"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/rules\"\u003eFill-a-pix\u003c/a\u003e is a logic puzzle game similar to Pic-a-Pix (aka Logic art) and Minesweeper. An example starting board is shown below on the left with the completed board shown to its right. Each number in the board indicates how many surrounding cells, including itself, are to be filled in. There are (up to) nine total cells associated with each number: four immediately adjacent (up, down, left, and right), four diagonally adjacent (one touching each corner), and the central cell (where the number is located).\u003c/p\u003e\u003cp\u003eBased on this logic, all 0's and 9's are determinant, as all nine cells are either empty or filled, respectively, for these numbers. Also, all 6's on the board edges and 4's in the corners should be completely filled in, as they only involve 6 or 4 cells, respectively.\u003c/p\u003e\u003cimg src = \"http://www.conceptispuzzles.com/picture/27/1558.gif\"\u003e\u003cimg src = \"http://www.conceptispuzzles.com/picture/27/1574.gif\"\u003e\u003cp\u003eThis problem deals with basic-logic Fill-a-pix problems; a sample step-by-step solution is found \u003ca href = \"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/techniques\"\u003ehere\u003c/a\u003e. These problems are basic in that each clue can be solved independent of all other clues, though some looping or iteration over the board will be required to solve all the clues. Basic logic can be summarized in the following two cases, regarding the cells associated with each clue: (1) if the sum of filled-in cells equals the clue, all other associated cells should be marked as empty, and (2) if the sum of empty cells equals the total number of associated cells minus the clue, all other associated cells should be marked as filled in.\u003c/p\u003e\u003cp\u003eFor this problem, you will be presented with a board full of clues. Write a function to solve the Fill-a-pix puzzle based on those clues, returning a solution of the same size as the board filled with 1's (filled) and 0's (empty).\u003c/p\u003e\u003cp\u003eA related problem is \u003ca href = \"https://www.mathworks.com/matlabcentral/cody/problems/3042-fill-a-pix-solution-checker\"\u003eFill-a-pix - Solution Checker\u003c/a\u003e.\u003c/p\u003e","function_template":"function [solution] = fill_a_pix_solver_basic(board)\r\n\r\nsolution = ones(size(board));\r\n\r\nend\r\n","test_suite":"%%\r\nboard = [-1,-1,-1,-1,1; -1,9,-1,-1,-1; -1,8,8,-1,-1; -1,-1,-1,-1,4; 4,-1,5,-1,2];\r\nboard(board==-1) = NaN;\r\nsolution = [1,1,1,0,0; 1,1,1,1,0; 1,1,1,1,1; 1,1,0,1,0; 1,1,1,1,0];\r\nassert(isequal(fill_a_pix_solver_basic(board),solution))\r\n\r\n%%\r\nboard = [-1,-1,-1,-1,-1,-1,-1,-1,0,-1; -1,8,8,-1,2,-1,0,-1,-1,-1; 5,-1,8,-1,-1,-1,-1,-1,-1,-1; -1,-1,-1,-1,-1,2,-1,-1,-1,2; 1,-1,-1,-1,4,5,6,-1,-1,-1; -1,0,-1,-1,-1,7,9,-1,-1,6; -1,-1,-1,6,-1,-1,9,-1,-1,6; -1,-1,6,6,8,7,8,7,-1,5; -1,4,-1,6,6,6,-1,6,-1,4; -1,-1,-1,-1,-1,-1,3,-1,-1,-1];\r\nboard(board==-1) = NaN;\r\nsolution = [0,1,1,0,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 0,1,1,0,0,0,0,0,0,0; 0,0,0,0,0,1,1,1,1,1; 0,0,0,1,1,1,1,1,1,1; 0,0,0,1,0,1,1,1,1,1; 0,1,1,1,1,1,1,1,1,1; 0,1,0,1,1,1,0,1,0,1; 0,0,1,0,0,0,1,0,1,0];\r\nassert(isequal(fill_a_pix_solver_basic(board),solution))\r\n\r\n%%\r\nboard = [-1,2,3,-1,-1,0,-1,-1,-1,-1; -1,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,6,-1,-1,-1,-1,-1,4,6,-1,-1,-1,-1; -1,-1,-1,-1,-1,-1,3,2,0,-1,4,4,3,-1,2];\r\nboard(board==-1) = NaN;\r\nsolution = [0,0,0,1,1,0,0,0,0,0,1,1,1,1,0; 0,0,1,0,1,0,0,1,1,1,0,0,0,0,1; 1,1,1,1,0,1,1,0,1,0,0,0,0,0,1; 1,0,0,0,1,0,1,1,0,0,0,0,1,1,0; 0,1,1,1,0,0,0,0,0,0,0,1,1,0,0; 0,1,0,1,0,0,0,0,0,0,0,1,1,1,0; 1,1,1,0,1,0,0,0,0,0,0,0,0,0,1; 1,0,0,1,1,0,0,0,0,0,1,1,1,1,1; 1,1,1,1,0,1,0,0,1,1,0,0,0,0,0; 1,0,0,1,0,0,1,1,1,1,0,0,0,0,0; 1,1,1,1,1,0,0,0,1,0,1,0,0,0,0; 1,1,0,0,1,0,0,0,0,1,0,1,1,0,0; 0,1,1,1,0,1,0,0,0,1,1,0,1,1,0; 0,1,1,0,0,1,1,0,0,0,1,1,0,1,0; 0,0,1,1,1,0,1,0,0,0,1,1,0,0,1];\r\nassert(isequal(fill_a_pix_solver_basic(board),solution))\r\n\r\n%% anti-cheating test case\r\nboard = NaN(9);\r\nsolution = NaN(9);\r\nfor i = 1:3\r\n\tfor j = 1:3\r\n\t\tif randi(2) == 2\r\n\t\t\tboard(i*3-1,j*3-1) = 9;\r\n\t\t\tsolution((i*3-2):(i*3),(j*3-2):(j*3)) = 1;\r\n\t\telse\r\n\t\t\tboard(i*3-1,j*3-1) = 0;\r\n\t\t\tsolution((i*3-2):(i*3),(j*3-2):(j*3)) = 0;\r\n\t\tend\r\n\tend\r\nend\r\nassert(isequal(fill_a_pix_solver_basic(board),solution))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":11,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":"2015-02-25T19:14:45.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2015-02-25T04:24:32.000Z","updated_at":"2026-04-01T15:40:48.000Z","published_at":"2015-02-25T04:24:32.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.gif\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/media/image2.gif\"}],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/rules\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eFill-a-pix\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is a logic puzzle game similar to Pic-a-Pix (aka Logic art) and Minesweeper. An example starting board is shown below on the left with the completed board shown to its right. Each number in the board indicates how many surrounding cells, including itself, are to be filled in. There are (up to) nine total cells associated with each number: four immediately adjacent (up, down, left, and right), four diagonally adjacent (one touching each corner), and the central cell (where the number is located).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on this logic, all 0's and 9's are determinant, as all nine cells are either empty or filled, respectively, for these numbers. Also, all 6's on the board edges and 4's in the corners should be completely filled in, as they only involve 6 or 4 cells, respectively.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis problem deals with basic-logic Fill-a-pix problems; a sample step-by-step solution is found\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/fill-a-pix/techniques\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehere\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. These problems are basic in that each clue can be solved independent of all other clues, though some looping or iteration over the board will be required to solve all the clues. Basic logic can be summarized in the following two cases, regarding the cells associated with each clue: (1) if the sum of filled-in cells equals the clue, all other associated cells should be marked as empty, and (2) if the sum of empty cells equals the total number of associated cells minus the clue, all other associated cells should be marked as filled in.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor this problem, you will be presented with a board full of clues. Write a function to solve the Fill-a-pix puzzle based on those clues, returning a solution of the same size as the board filled with 1's (filled) and 0's (empty).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA related problem is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/3042-fill-a-pix-solution-checker\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eFill-a-pix - Solution Checker\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"},{\"partUri\":\"/media/image1.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhbgBuAPcAAP///wAAABISEmxsbO/v756enoCAgHNzc5KSkt3d3d/f3729vf7+/vDw8GVlZeDg4PLy8m5ubvb29vz8/C4uLjExMd7e3vv7++3t7V5eXvr6+omJiSMjIwwMDPn5+Q0NDfT09NHR0XBwcDQ0NOHh4Xh4eP39/T09PePj4yEhIZWVlc/Pz4iIiF1dXYKCgnJycjY2NnR0dEJCQhsbG0NDQz4+PoGBgcHBwTIyMjo6Onp6ei0tLQUFBQ8PD21tbZSUlG9vb+Tk5AsLC76+vqurq5qamqCgoHd3d3x8fH5+fmdnZ8vLy+np6QEBAby8vKGhoScnJxYWFhcXF+vr64WFhSIiIpmZmWRkZNzc3HV1dVdXV8rKyiQkJB8fH5GRkebm5jk5OWtra+rq6i8vL0pKShEREZiYmMnJyc7OzqioqGFhYURERAYGBsPDw5CQkIaGhvj4+CAgIIeHh0BAQLq6uvHx8Z2dnZeXlxQUFDMzM6Ojo0lJSWJiYjg4OFpaWlhYWHFxcYuLi6mpqY2NjSYmJhoaGufn5x4eHg4ODigoKOzs7Pf398bGxhMTE1JSUmlpacXFxRkZGaWlpa+vr09PT/Pz84yMjHl5edjY2EVFRY+Pj83NzdDQ0LCwsFlZWZubm4SEhEFBQaysrKqqqlZWVtPT039/fzs7OwICAri4uMDAwJaWljw8PAgICE1NTQMDAzAwMLe3t1FRUa6urqampk5OTktLS7+/v8fHxykpKa2trVtbW6enp+Xl5QQEBI6OjlRUVEhISPX19VxcXH19fZOTkx0dHWNjY7KysoqKiioqKhgYGAcHB0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QdmQBNjWEOuI6TrRYea0YFM4AIXIEYA6ICsgXjtZznU3VntmkWo4tJZSLgqQR7bUII8dLI3jRdCLLCAbZA1sK7c6sqOyLMkgu15q3Vpa//5hoj/MKEEEdEAICQCCA1ExAqxhIgkxLUHBBj3uMhNrnFNIQPlOhe5LKjBc6eLgBqwgLrOfUYSsKtcP4gLCAkIr3jHS97w3uAY5U3veFfQAvW6NwEtWMF705uEW8y3vBsQl48gAiQhYREiRkKSkiDCpIoKtqmh3Rors3oQCXTUs5JFSK4Qi1gT3FW0mWRwQSZRhWH4MsKyJAgWdpCCLnQhEBdWcEE6kYMdbECUm3UtAyoQgH85FMRXW9UZAqCMPOBABSkOX0FC8IoOHCIA+42xgQtCi0jMwMYQHs+GO3CBrFl2IChC6iYkQIFlPFggnDWIBjjwix2A4cNSJggVZqAKQYgh/62sLUYt3KKFDlQCsDe0TiEgUIUz3zjNA4mATVIwqlti2VkoaAQFYAxm/C2CEEUAQBxYgWbYCkQH0iDCGwIQhiB/8CBBcKsoTptnggwhAA54wQciMYs/W7ogUthYZWmYAEIEwA0MLPVAuFEGHqDClP8VyGclTCITDEKGAJAClAdiaIGgqAE76EEq7rdkgWgAAxhgwgxGIAxXs20gMw7AFgjTqFmzlhoBcEUasKGHHyo5mgKRQh4q/e2BOKEDNaFANTxNzIII7SZxebdKwQ0JZ9CbpQSxQBEEsTd+R7UgpViAxBcADd8KHKhKrLfOWFtDeD8Q0BuXbcdJI4eITOESEWKZwAsk8gJGN6QITIgIL8RFiQLY/OY4z7nNAxEMnfsc5yqgwc+HXgAaqIDoPt/FBpCucz5kiiZBibrUp071qQ8lISOBida3zvWuc10mIQm72MdO9rKb/exoT7va1872tgMgIAA7\"},{\"partUri\":\"/media/image2.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhbgBuAPcAAAAAAP///0JCQhISEk9PT56ent3d3eLi4m5ubpKSksXFxe/v79/f33Nzc2xsbICAgPv7+yoqKmRkZPb29oGBgXd3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+vYAMcuix0AGgBJYQQQ0M4Ac4EupE/2qEEW7xAReYtLnhuzAiApCDCnPzJnUIgBVU3GIOF8bDCACBDzJQCACMAac4Rp9OJDAFE/S4xL2zSRqC0EBKulhTicKrMYgwAWQMIg8ke21Xb+IFKiTh/xhd8DFP6NkHQxCAB7tQ5l3EBQhnMOcUZUADzrhLmB4UgRAiiDOWC1yTVAxEBr34crIeDBs2KCMEkvisTjNghbZJQhFy3gk9oyCGC8giALkz8osP8gLF2oGvYFRCAH4QBiEMQQKLZrBNNGACInxukA42iAHqcIFQnK23sW6BB2zsBFvkGr82QUUccO0DEyxS1WAuiCmQsAgw4C3K78PJGkiygioEgpdoCZ0GRBCAR/QgAFKQdLXEFYULtAIDeRCEa8FtP55QQWrPbjBOOgEFgYihydieNIokMICbMKFLanZuTjZgBFaEWs83iQAaJEAIjB+5bHewgMgtQIwgjCjiOVp+bsJ/3OG/KNiturbwYB6srQhXN+YsL8wQIvKD867350BvygeuQ/SiG53oupAWTbzjnYYz/elnGUpCoN50mFj96i6RSUi2zvWue/3rYA+72MdO9rKb/ewBCAgAOw==\"}]}"},{"id":701,"title":"Play Tic-Tac-Toe: Easy Bots","description":"Interactive Tic-Tac-Toe game versus the test suite algorithms.\r\n\r\nThe contest will be 50 games of Computer first and 50 games of Player first.\r\n\r\nThe tic-tac-bots are not strong and are named Up, Down, and Random.\r\n\r\nInitial board is zeros(3).\r\nComputer moves are 1s and Player moves are 2s.\r\n\r\nPlayer output is an integer 1:9 to identify array position\r\n\r\n1 4 7\r\n\r\n2 5 8\r\n\r\n3 6 9\r\n\r\nExamples:\r\n\r\nInput: [1 0 0;0 0 0;0 0 0]  % Computer first case\r\n\r\nOutput: 5\r\n\r\nYields : [1 0 0; 0 2 0;0 0 0] with computer then picking position 2.\r\n\r\nSecond Input: [1 0 0;1 2 0;0 0 0] with computer's second move shown\r\n\r\n.\r\n\r\nPassing Score is 66 Wins out of 100 games.\r\n\r\nIt may be possible to score 100 Wins against the tic-tac-bots.\r\n\r\nYour Total Wins will be displayed.\r\n\r\nA follow-on problem will be 100 Tic-Tac-Toe Games: Never Lose Challenge\r\n\r\n","description_html":"\u003cp\u003eInteractive Tic-Tac-Toe game versus the test suite algorithms.\u003c/p\u003e\u003cp\u003eThe contest will be 50 games of Computer first and 50 games of Player first.\u003c/p\u003e\u003cp\u003eThe tic-tac-bots are not strong and are named Up, Down, and Random.\u003c/p\u003e\u003cp\u003eInitial board is zeros(3).\r\nComputer moves are 1s and Player moves are 2s.\u003c/p\u003e\u003cp\u003ePlayer output is an integer 1:9 to identify array position\u003c/p\u003e\u003cp\u003e1 4 7\u003c/p\u003e\u003cp\u003e2 5 8\u003c/p\u003e\u003cp\u003e3 6 9\u003c/p\u003e\u003cp\u003eExamples:\u003c/p\u003e\u003cp\u003eInput: [1 0 0;0 0 0;0 0 0]  % Computer first case\u003c/p\u003e\u003cp\u003eOutput: 5\u003c/p\u003e\u003cp\u003eYields : [1 0 0; 0 2 0;0 0 0] with computer then picking position 2.\u003c/p\u003e\u003cp\u003eSecond Input: [1 0 0;1 2 0;0 0 0] with computer's second move shown\u003c/p\u003e\u003cp\u003e.\u003c/p\u003e\u003cp\u003ePassing Score is 66 Wins out of 100 games.\u003c/p\u003e\u003cp\u003eIt may be possible to score 100 Wins against the tic-tac-bots.\u003c/p\u003e\u003cp\u003eYour Total Wins will be displayed.\u003c/p\u003e\u003cp\u003eA follow-on problem will be 100 Tic-Tac-Toe Games: Never Lose Challenge\u003c/p\u003e","function_template":"function p = tic_tac_toe(x)\r\n  p = 1;\r\nend","test_suite":"%%\r\n%Tic-Tac-Toe \r\n%Demonstration of Multi-Call with adaptive response\r\n\r\nwins=0;\r\nPass=0;\r\nfor i=1:50 % Computer First;  51-100 will be Player First\r\n x=zeros(3);\r\n while true % exit on win or filled board\r\n  if i\u003c16 % Up bot\r\n   p=find(x==0,1);\r\n  elseif i\u003c31 % Down bot\r\n   p=find(x==0,1,'last');\r\n  else % 31 thru 50 % random bot\r\n   found=0;\r\n   while ~found\r\n    p=floor(9*rand)+1;\r\n    if x(p)==0,break;end\r\n   end\r\n  end\r\n  % Implement Computer move and Check for Win\r\n  x(p)=1;\r\n  wt=x;\r\n  wt(wt==2)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==3);\r\n  if win,break;end % Computer Wins on its move\r\n  \r\n  % Draw check Post computer move (9th move)\r\n  if sum(x(:))\u003e=13,break;end\r\n  \r\n  % Implement player move and Check for Win\r\n  p=tic_tac_toe(x);\r\n  p=p(1);\r\n  if x(p)~=0,break;end % Invalid move - Game over\r\n  x(p)=2;\r\n  wt=x;\r\n  wt(wt==1)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==6);\r\n  if win\r\n   wins=wins+1;\r\n   break;\r\n  end % Player Wins on their move\r\n  \r\n  \r\n end % gameover while 1:50\r\nend % Games 1:50\r\n\r\n% Output wins against Computer first\r\nwins\r\n\r\nfor i=51:100 % Player First;  51-100 Player First\r\n x=zeros(3);\r\n while true % exit on win or filled board\r\n  % Implement player move and Check for Win\r\n  p=tic_tac_toe(x);\r\n  p=p(1);\r\n  if x(p)~=0,break;end % Invalid move - Game over\r\n  x(p)=2;\r\n  wt=x;\r\n  wt(wt==1)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==6);\r\n  if win\r\n   wins=wins+1;\r\n   break;\r\n  end % Player Wins on their move   \r\n  \r\n  % Draw check Post computer move (9th move)\r\n  if sum(x(:))\u003e=13,break;end\r\n     \r\n  if i\u003c66 % Up bot\r\n   p=find(x==0,1);\r\n  elseif i\u003c81 % Down bot\r\n   p=find(x==0,1,'last');\r\n  else % 31 thru 50 % random bot\r\n   found=0;\r\n   while ~found\r\n    p=floor(9*rand)+1;\r\n    if x(p)==0,break;end\r\n   end\r\n  end\r\n  % Implement Computer move and Check for Win\r\n  x(p)=1;\r\n  wt=x;\r\n  wt(wt==2)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==3);\r\n  if win,break;end % Computer Wins on its move\r\n   \r\n end % gameover while 51:100\r\nend % Games 51:100\r\n\r\nwins\r\n\r\nif wins\u003e65,Pass=1;end\r\nassert(isequal(Pass,1))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":24,"test_suite_updated_at":"2012-06-03T19:49:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-05-19T15:10:18.000Z","updated_at":"2026-01-03T17:04:22.000Z","published_at":"2012-05-19T16:47:46.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eInteractive Tic-Tac-Toe game versus the test suite algorithms.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe contest will be 50 games of Computer first and 50 games of Player first.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe tic-tac-bots are not strong and are named Up, Down, and Random.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eInitial board is zeros(3). Computer moves are 1s and Player moves are 2s.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer output is an integer 1:9 to identify array position\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e1 4 7\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e2 5 8\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e3 6 9\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eExamples:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eInput: [1 0 0;0 0 0;0 0 0] % Computer first case\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOutput: 5\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYields : [1 0 0; 0 2 0;0 0 0] with computer then picking position 2.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSecond Input: [1 0 0;1 2 0;0 0 0] with computer's second move shown\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePassing Score is 66 Wins out of 100 games.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIt may be possible to score 100 Wins against the tic-tac-bots.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour Total Wins will be displayed.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA follow-on problem will be 100 Tic-Tac-Toe Games: Never Lose Challenge\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":702,"title":"Play Tic Tac Toe : No Losses Allowed","description":"Let's play a friendly game of Tic Tac Toe \r\n\r\nCreate an efficient algorithm to Never Lose.\r\n\r\nThe Player may be either the first or second to play.\r\n\r\nInitial board is zeros(3). Computer moves are 1s and Player moves are 2s.\r\n\r\nPlayer output is an integer 1:9 to identify array index position\r\n\r\n 1 4 7\r\n 2 5 8\r\n 3 6 9\r\n\r\nExample game play:\r\n\r\n Input:        [1 0 0; 0 0 0; 0 0 0]  % Computer playing first in this example\r\n Output:        5                     % Player return value\r\n Yields :      [1 0 0; 0 2 0; 0 0 0]  % Computer then picks position 2.\r\n Second Input: [1 0 0; 1 2 0; 0 0 0]  % Computer's second move shown.\r\n\r\nPassing score is never losing.\r\n\r\nThe contest engine is almost Random - about 4000 times. (\u003c12% of Time-Out)\r\n\r\nCreating the perfect tic-tac-toe engine seemed unnecessary.\r\n\r\nYour Wins/Losses/Draws will be shown.\r\n\r\nOn a loss the losing board will be shown\r\n\r\nFollow-up game will be WOPR:Global Thermonuclear War.","description_html":"\u003cp\u003eLet's play a friendly game of Tic Tac Toe\u003c/p\u003e\u003cp\u003eCreate an efficient algorithm to Never Lose.\u003c/p\u003e\u003cp\u003eThe Player may be either the first or second to play.\u003c/p\u003e\u003cp\u003eInitial board is zeros(3). Computer moves are 1s and Player moves are 2s.\u003c/p\u003e\u003cp\u003ePlayer output is an integer 1:9 to identify array index position\u003c/p\u003e\u003cpre\u003e 1 4 7\r\n 2 5 8\r\n 3 6 9\u003c/pre\u003e\u003cp\u003eExample game play:\u003c/p\u003e\u003cpre\u003e Input:        [1 0 0; 0 0 0; 0 0 0]  % Computer playing first in this example\r\n Output:        5                     % Player return value\r\n Yields :      [1 0 0; 0 2 0; 0 0 0]  % Computer then picks position 2.\r\n Second Input: [1 0 0; 1 2 0; 0 0 0]  % Computer's second move shown.\u003c/pre\u003e\u003cp\u003ePassing score is never losing.\u003c/p\u003e\u003cp\u003eThe contest engine is almost Random - about 4000 times. (\u0026lt;12% of Time-Out)\u003c/p\u003e\u003cp\u003eCreating the perfect tic-tac-toe engine seemed unnecessary.\u003c/p\u003e\u003cp\u003eYour Wins/Losses/Draws will be shown.\u003c/p\u003e\u003cp\u003eOn a loss the losing board will be shown\u003c/p\u003e\u003cp\u003eFollow-up game will be WOPR:Global Thermonuclear War.\u003c/p\u003e","function_template":"function p = tic_tac_toe(x)\r\n  p = 1;\r\nend","test_suite":"%%\r\n%Tic Tac Toe : Never Lose\r\ndraws=0;\r\nwins=0;\r\nPass=1;\r\nfor i=1:2000 % Computer First;  2001-4000 Player First\r\n if Pass==0,break;end\r\n x=zeros(3);\r\n while true % exit on win or filled board\r\n   found=0;\r\n   while ~found\r\n    p=floor(9*rand)+1;\r\n    if x(p)==0,break;end\r\n   end\r\n\r\n% Random unless Win presents itself\r\n  v0=find(x==0)';\r\n  t1=x;\r\n  t1(t1==2)=-2; % Player pips set to -2\r\n% Check for Win Option\r\n wc=find(sum(t1)==2); % column with a win\r\n if ~isempty(wc)\r\n  p=intersect((1:3)+3*(wc-1),v0);\r\n end\r\n wr=find(sum(t1,2)==2); % row with a win\r\n if ~isempty(wr)\r\n  p=intersect((1:3:7)+(wr-1),v0);\r\n end\r\n% Diagonal Win Options\r\nif x(5)==1\r\n if x(1)==1 \u0026\u0026 x(9)==0,p=9;end\r\n if x(9)==1 \u0026\u0026 x(1)==0,p=1;end\r\n if x(3)==1 \u0026\u0026 x(7)==0,p=7;end\r\n if x(7)==1 \u0026\u0026 x(3)==0,p=3;end\r\nend\r\n% end of Win check\r\n   \r\n   \r\n   \r\n  % Implement Computer move and Check for Win\r\n  x(p)=1;\r\n  wt=x;\r\n  wt(wt==2)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==3);\r\n  if win % Computer Wins on its move : Match Over\r\n   Pass=0;\r\n   x\r\n   break;\r\n  end \r\n  \r\n  % Draw check Post computer move (9th move)\r\n  if sum(x(:))\u003e=13,\r\n   draws=draws+1;\r\n   break;\r\n  end\r\n  \r\n  % Implement player move and Check for Win\r\n  p=tic_tac_toe(x);\r\n  if x(p(1))~=0,Pass=0;end % Invalid move - Game over\r\n  x(p(1))=2;\r\n  wt=x;\r\n  wt(wt==1)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==6);\r\n  if win\r\n   wins=wins+1;\r\n   break;\r\n  end % Player Wins on their move\r\n  \r\n  \r\n end % gameover while 1:2000\r\nend % Games 1:2000\r\n\r\n\r\nfor i=1:2000 % Player First;  2001-40000 Player First\r\n if Pass==0,break;end\r\n x=zeros(3);\r\n while true % exit on win or filled board\r\n  % Implement player move and Check for Win\r\n  p=tic_tac_toe(x);\r\n  if x(p(1))~=0,Pass=0;end % Invalid move - Game over\r\n  x(p(1))=2;\r\n  wt=x;\r\n  wt(wt==1)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==6);\r\n  if win\r\n   wins=wins+1;\r\n   break;\r\n  end % Player Wins on their move\r\n  \r\n  \r\n  % Draw check Post Player move (9th move)\r\n  if sum(x(:))\u003e=13,\r\n   draws=draws+1;\r\n   break;\r\n  end\r\n  \r\n  % Computer Move\r\n   found=0;\r\n   while ~found\r\n    p=floor(9*rand)+1;\r\n    if x(p)==0,break;end\r\n   end\r\n  \r\n% Random unless Win presents itself\r\n  v0=find(x==0)';\r\n  t1=x;\r\n  t1(t1==2)=-2; % Player pips set to -2\r\n% Check for Win Option\r\n wc=find(sum(t1)==2); % column with a win\r\n if ~isempty(wc)\r\n  p=intersect((1:3)+3*(wc-1),v0);\r\n end\r\n wr=find(sum(t1,2)==2); % row with a win\r\n if ~isempty(wr)\r\n  p=intersect((1:3:7)+(wr-1),v0);\r\n end\r\n% Diagonal Win Options\r\nif x(5)==1\r\n if x(1)==1 \u0026\u0026 x(9)==0,p=9;end\r\n if x(9)==1 \u0026\u0026 x(1)==0,p=1;end\r\n if x(3)==1 \u0026\u0026 x(7)==0,p=7;end\r\n if x(7)==1 \u0026\u0026 x(3)==0,p=3;end\r\nend\r\n% end of Win check\r\n   \r\n  % Implement Computer move and Check for Win\r\n  x(p)=1;\r\n  wt=x;\r\n  wt(wt==2)=0;\r\n  win=any([sum(wt) sum(wt,2)' trace(wt) trace(fliplr(wt))]==3);\r\n  if win % Computer Wins on its move : Match Over\r\n   Pass=0;\r\n   x\r\n   break;\r\n  end \r\n  \r\n  \r\n end % gameover while 1:2000\r\nend % Games 1:2000\r\nwins\r\ndraws\r\nPass\r\nassert(isequal(Pass,1))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":"2012-05-23T04:19:50.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-05-19T23:49:07.000Z","updated_at":"2026-01-04T12:38:00.000Z","published_at":"2012-05-20T00:36:44.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eLet's play a friendly game of Tic Tac Toe\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCreate an efficient algorithm to Never Lose.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Player may be either the first or second to play.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eInitial board is zeros(3). Computer moves are 1s and Player moves are 2s.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer output is an integer 1:9 to identify array index position\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ 1 4 7\\n 2 5 8\\n 3 6 9]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eExample game play:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ Input:        [1 0 0; 0 0 0; 0 0 0]  % Computer playing first in this example\\n Output:        5                     % Player return value\\n Yields :      [1 0 0; 0 2 0; 0 0 0]  % Computer then picks position 2.\\n Second Input: [1 0 0; 1 2 0; 0 0 0]  % Computer's second move shown.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePassing score is never losing.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe contest engine is almost Random - about 4000 times. (\u0026lt;12% of Time-Out)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCreating the perfect tic-tac-toe engine seemed unnecessary.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour Wins/Losses/Draws will be shown.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn a loss the losing board will be shown\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFollow-up game will be WOPR:Global Thermonuclear War.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2346,"title":"Tic Tac Toe Solver","description":"Create a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and o's as 0's) to determine which player won (if either) and which direction the win lies. 1=win for x's, 0=win for o's, -1=tie. 1=horizontal, 2=vertical, 3=diagonal, 0=not applicable (used for a tie). For example, in the following board:\r\n\r\n 0 1 0\r\n 1 1 1\r\n 1 0 0\r\n\r\nthe 1's player won in a horizontal direction: [1 1].\r\n\r\nSee the test suite below for more examples. The solution will be an nx2 matrix with one row for each board.","description_html":"\u003cp\u003eCreate a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and o's as 0's) to determine which player won (if either) and which direction the win lies. 1=win for x's, 0=win for o's, -1=tie. 1=horizontal, 2=vertical, 3=diagonal, 0=not applicable (used for a tie). For example, in the following board:\u003c/p\u003e\u003cpre\u003e 0 1 0\r\n 1 1 1\r\n 1 0 0\u003c/pre\u003e\u003cp\u003ethe 1's player won in a horizontal direction: [1 1].\u003c/p\u003e\u003cp\u003eSee the test suite below for more examples. The solution will be an nx2 matrix with one row for each board.\u003c/p\u003e","function_template":"function win_ans = ttt_checker(board)\r\n win_ans = [-1 0];\r\nend","test_suite":"%%\r\nboard = [1 0 0;\r\n\t 0 1 0;\r\n\t 1 0 1];\r\nwin_ans = [1 3];\r\nassert(isequal(ttt_checker(board),win_ans))\r\n\r\n%%\r\nboard = [1 0 1;\r\n\t 0 1 0;\r\n\t 0 1 0];\r\nwin_ans = [-1 0];\r\nassert(isequal(ttt_checker(board),win_ans))\r\n\r\n%%\r\nboard = zeros(3,3,2);\r\nwin_ans = zeros(2,2);\r\nboard(:,:,1) = [0 1 0;\r\n\t\t1 1 1;\r\n\t\t1 0 0];\r\nwin_ans(1,:) = [1 1];\r\n\r\nboard(:,:,2) = [0 0 0;\r\n\t\t1 1 0;\r\n\t\t0 1 1];\r\nwin_ans(2,:) = [0 1];\r\nassert(isequal(ttt_checker(board),win_ans))\r\n\r\n%%\r\nboard = zeros(3,3,4);\r\nwin_ans = zeros(4,2);\r\nboard(:,:,1) = [1 0 1;\r\n\t\t0 1 1;\r\n\t\t0 1 0];\r\nwin_ans(1,:) = [-1 0];\r\n\r\nboard(:,:,2) = [0 0 1;\r\n\t\t0 1 0;\r\n\t\t0 1 1];\r\nwin_ans(2,:) = [0 2];\r\n\r\nboard(:,:,3) = [1 1 1;\r\n\t\t1 0 0;\r\n\t\t0 1 0];\r\nwin_ans(3,:) = [1 1];\r\n\r\nboard(:,:,4) = [1 0 1;\r\n\t\t0 0 0;\r\n\t\t0 1 1];\r\nwin_ans(4,:) = [0 1];\r\nassert(isequal(ttt_checker(board),win_ans))\r\n\r\n%%\r\nboard = zeros(3,3,5);\r\nwin_ans = zeros(5,2);\r\nboard(:,:,1) = [1 1 0;\r\n\t\t0 0 1;\r\n\t\t0 1 0];\r\nwin_ans(1,:) = [0 3];\r\n\r\nboard(:,:,2) = [0 0 1;\r\n\t\t1 1 0;\r\n\t\t0 1 1];\r\nwin_ans(2,:) = [-1 0];\r\n\r\nboard(:,:,3) = [1 1 0;\r\n\t\t0 1 1;\r\n\t\t0 1 0];\r\nwin_ans(3,:) = [1 2];\r\n\r\nboard(:,:,4) = [1 0 1;\r\n\t\t1 0 0;\r\n\t\t0 0 1];\r\nwin_ans(4,:) = [0 2];\r\n\r\nboard(:,:,5) = [1 0 1;\r\n\t\t0 1 0;\r\n\t\t0 1 1];\r\nwin_ans(5,:) = [1 3];\r\nassert(isequal(ttt_checker(board),win_ans))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":30,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-06-04T14:21:06.000Z","updated_at":"2025-12-02T20:38:10.000Z","published_at":"2014-06-04T14:34:13.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCreate a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and o's as 0's) to determine which player won (if either) and which direction the win lies. 1=win for x's, 0=win for o's, -1=tie. 1=horizontal, 2=vertical, 3=diagonal, 0=not applicable (used for a tie). For example, in the following board:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ 0 1 0\\n 1 1 1\\n 1 0 0]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ethe 1's player won in a horizontal direction: [1 1].\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee the test suite below for more examples. The solution will be an nx2 matrix with one row for each board.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":3690,"title":"OXO counting","description":"Count the number of occurrences of \"OXO\" in rows, columns, diagonals and anti-diagonals.\r\n\r\n\r\nExample:\r\n\r\n    \u003e\u003e board = ['OOX'\r\n                'XXO'\r\n                'OXO'];\r\n    \u003e\u003e count_OXO(board)\r\n    ans =\r\n       3\r\n    \u003e\u003e board = [' O '\r\n                'XXO'\r\n                'OXO'];\r\n    \u003e\u003e count_OXO(board)\r\n    ans =\r\n       1","description_html":"\u003cp\u003eCount the number of occurrences of \"OXO\" in rows, columns, diagonals and anti-diagonals.\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre\u003e    \u0026gt;\u0026gt; board = ['OOX'\r\n                'XXO'\r\n                'OXO'];\r\n    \u0026gt;\u0026gt; count_OXO(board)\r\n    ans =\r\n       3\r\n    \u0026gt;\u0026gt; board = [' O '\r\n                'XXO'\r\n                'OXO'];\r\n    \u0026gt;\u0026gt; count_OXO(board)\r\n    ans =\r\n       1\u003c/pre\u003e","function_template":"function y = count_OXO(board)\r\n  y = ;\r\nend","test_suite":"%%\r\nboard = 'OXO';\r\ny_correct = 1;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = '';\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = '   ';\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ' X ';\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'O O';\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'O O OXO X';\r\ny_correct = 1;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'OOX';\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'OOXOX';\r\ny_correct = 1;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'OOX OX';\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'OOXXO';\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'OOXOOOOXXOXOX';\r\ny_correct = 2;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['OOO';'OXO';'OXO'];\r\ny_correct = 4;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['OOO';'OXO';'OOO'];\r\ny_correct = 4;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['OXX';'XXX';'XOO'];\r\ny_correct = 1;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['OOO';'X O';'OXO'];\r\ny_correct = 2;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['     ';'     ';'     ';'     '];\r\ny_correct = 0;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['O OO';'O XO';'OOX '];\r\ny_correct = 1;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['OXXOXO';' OXO X';'XOXOXO'];\r\ny_correct = 6;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = ['OXOXOXO';'OXOXO X';'XOOOXOX'];\r\ny_correct = 8;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\nboard = 'OXO'.';\r\ny_correct = 1;\r\nassert(isequal(count_OXO(board),y_correct))\r\n%%\r\n% Keep in mind that Test Suite may be extended, so try to write general solution.\r\n% If you find any bugs, please report it to me. Thanks!\r\n% Have fun.","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":14358,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":18,"test_suite_updated_at":"2017-08-31T12:44:18.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2015-03-24T21:25:19.000Z","updated_at":"2026-01-04T13:01:10.000Z","published_at":"2017-08-31T09:25:21.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCount the number of occurrences of \\\"OXO\\\" in rows, columns, diagonals and anti-diagonals.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[    \u003e\u003e board = ['OOX'\\n                'XXO'\\n                'OXO'];\\n    \u003e\u003e count_OXO(board)\\n    ans =\\n       3\\n    \u003e\u003e board = [' O '\\n                'XXO'\\n                'OXO'];\\n    \u003e\u003e count_OXO(board)\\n    ans =\\n       1]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":3033,"title":"Tic-Tac-Logic - Solution Checker","description":"\u003chttp://www.conceptispuzzles.com/index.aspx?uri=puzzle/tic-tac-logic/rules Tic-Tac-Logic\u003e is a logic puzzle wherein a rectangular grid containing a certain set of pre-filled squares must be filled in completely to have no more than two consecutive X's or O's in any row or column. Also, the number of X's and O's must be the same in every row and column (equal to half the size of the row or column). Finally, all rows must be unique (compared to other rows) and all columns must be unique (compared to other columns).\r\n\r\nAn example puzzle from Conceptis is included here, wherein the first board represents the starting condition and the second board represents a properly solved board:\r\n\r\n\u003c\u003chttp://www.conceptispuzzles.com/picture/11/3993.gif\u003e\u003e\r\n\r\n\u003c\u003chttp://www.conceptispuzzles.com/picture/11/3994.gif\u003e\u003e\r\n\r\nYou will be provided with a variety of completed boards. X's are represented by ones and O's by zeros. Write a function to test whether the board has been properly solved. Remember to check against all three criteria.","description_html":"\u003cp\u003e\u003ca href = \"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/tic-tac-logic/rules\"\u003eTic-Tac-Logic\u003c/a\u003e is a logic puzzle wherein a rectangular grid containing a certain set of pre-filled squares must be filled in completely to have no more than two consecutive X's or O's in any row or column. Also, the number of X's and O's must be the same in every row and column (equal to half the size of the row or column). Finally, all rows must be unique (compared to other rows) and all columns must be unique (compared to other columns).\u003c/p\u003e\u003cp\u003eAn example puzzle from Conceptis is included here, wherein the first board represents the starting condition and the second board represents a properly solved board:\u003c/p\u003e\u003cimg src = \"http://www.conceptispuzzles.com/picture/11/3993.gif\"\u003e\u003cimg src = \"http://www.conceptispuzzles.com/picture/11/3994.gif\"\u003e\u003cp\u003eYou will be provided with a variety of completed boards. X's are represented by ones and O's by zeros. Write a function to test whether the board has been properly solved. Remember to check against all three criteria.\u003c/p\u003e","function_template":"function [tf] = tic_tac_logic_check(board)\r\n\r\ntf = 1;\r\n[m,n] = size(board);\r\n\r\n%check up to only two consecutive\r\n\r\n%check same number in each row/column\r\n\r\n%check unique rows and columns\r\n\r\nend","test_suite":"%%\r\nboard = [0,1,1,0,0,1; 1,0,1,0,0,1; 0,1,0,1,1,0; 0,1,0,1,0,1; 1,0,1,0,1,0; 1,0,0,1,1,0];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [0,1,0,1,0,1; 0,1,0,1,0,1; 1,0,1,0,1,0; 1,0,1,0,1,0; 0,1,0,1,0,1; 1,0,1,0,1,0];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [0,1,0,0,1,0,1,1; 0,0,1,0,1,1,0,1; 1,0,1,1,0,1,0,0; 0,1,0,1,0,0,1,1; 1,1,0,0,1,1,0,0; 1,0,1,0,1,1,0,0; 0,0,1,1,0,0,1,1; 1,1,0,1,0,0,1,0];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [0,0,1,1,0,1,1,0,1,0; 1,1,0,0,1,1,0,1,0,0; 1,1,0,0,1,0,1,0,1,0; 0,0,1,1,0,1,0,1,0,1; 1,0,1,1,0,0,1,1,0,0; 1,1,0,0,1,1,0,0,1,0; 0,1,0,1,0,0,1,0,1,1; 0,0,1,0,1,0,1,1,0,1];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [1,0,1,0,1,0; 0,1,1,0,1,0; 1,0,0,1,0,1; 1,0,0,1,1,0; 0,1,1,0,0,1; 0,1,0,1,0,1];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [0,1,1,0,0,1; 1,0,1,0,0,1; 0,1,0,1,1,0; 0,1,1,0,0,1; 1,0,1,0,1,0; 1,0,0,1,1,0];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [0,1,0,0,1,1,0,1; 0,0,1,0,1,1,0,1; 1,0,1,1,0,1,0,0; 0,1,0,1,0,0,1,1; 1,1,0,0,1,1,0,0; 1,0,1,0,1,1,0,0; 0,0,1,1,0,0,1,1; 1,1,0,1,0,0,1,0];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [0,0,1,1,0,1,1,0; 1,1,0,1,0,0,1,0; 0,0,1,0,1,1,0,1; 0,1,0,1,0,1,0,1; 1,0,1,0,1,0,1,0; 0,0,1,0,1,0,1,1; 1,1,0,1,0,1,0,0; 1,1,0,0,1,0,0,1];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,0; 0,0,1,1,0,1,0,1; 1,1,0,1,0,0,1,0; 0,0,1,0,1,1,0,1; 0,1,0,1,0,1,1,0; 1,0,1,0,1,0,0,1; 0,1,0,1,0,1,0,1];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [0,0,1,1,0,1,1,0; 1,1,0,1,0,0,1,0; 0,0,1,1,0,1,0,1; 0,1,0,1,0,1,0,1; 1,0,1,0,1,0,1,0; 0,0,1,0,1,0,1,1; 1,1,0,1,0,1,0,0; 1,1,0,0,1,0,0,1];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [0,1,1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,1,0,0; 1,0,0,1,0,1,0,0,1,1; 0,1,1,0,1,0,1,0,0,1; 1,0,1,0,0,1,0,1,1,0; 1,0,0,1,1,0,1,0,0,1; 0,1,0,1,0,1,0,1,1,0; 0,1,1,0,0,1,1,0,0,1; 1,0,0,1,1,0,0,1,0,1; 0,0,1,1,0,1,0,1,1,0];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [0,0,0,1,1,1; 1,1,1,0,0,0; 1,0,1,0,1,0; 0,1,0,1,0,1; 1,1,0,0,0,1; 0,0,1,1,1,0];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [1,1,0,0,1,0,1,0,0,1; 1,0,0,1,0,1,0,1,1,0; 0,1,1,0,1,0,0,1,0,1; 0,0,1,1,0,1,1,0,1,0; 1,0,0,1,1,0,1,0,0,1; 1,1,0,0,1,0,0,1,1,0; 0,1,1,0,0,1,0,1,1,0; 0,0,1,1,0,1,1,0,0,1];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [0,1,1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,1,0,0; 1,0,0,1,0,1,0,0,1,1; 0,1,1,0,1,0,1,0,0,1; 1,0,1,0,0,1,0,1,1,0; 1,0,1,0,1,0,1,0,0,1; 0,1,0,1,0,1,0,1,1,0; 0,1,1,0,0,1,1,0,0,1; 1,0,0,1,1,0,0,1,0,1; 0,0,1,1,0,1,0,1,1,0];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [0,0,1,1,0,1,0,0,1,1; 1,1,0,0,1,1,0,1,0,0; 1,1,0,0,1,0,1,0,1,0; 0,0,1,1,0,1,0,1,0,1; 1,0,1,1,0,0,1,1,0,0; 1,1,0,0,1,1,0,0,1,0; 0,1,0,1,0,0,1,0,1,1; 0,0,1,0,1,0,1,1,0,1];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [1,1,0,0,1,0,1,0,0,1; 1,0,0,1,0,1,0,1,1,0; 0,1,1,0,1,0,0,1,0,1; 0,0,1,1,0,1,1,0,0,1; 1,0,0,1,1,0,1,0,0,1; 1,1,0,0,1,0,0,1,1,0; 0,1,1,0,0,1,0,1,1,0; 0,0,1,1,0,1,1,0,0,1];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [1,1,0,0,1,1,0,0; 0,0,1,1,0,1,0,1; 1,0,1,1,0,0,1,0; 0,1,0,0,1,0,1,1; 1,0,1,0,1,1,0,0; 0,1,0,0,1,0,1,1];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [1,1,0,0,1,1,0,0; 0,0,1,1,0,1,0,1; 1,0,1,1,0,0,1,0; 0,1,0,0,1,0,1,1; 1,0,1,0,1,1,0,0; 0,1,0,1,0,0,1,1];\r\nassert(isequal(tic_tac_logic_check(board),1))\r\n\r\n%%\r\nboard = [1,0,1,0,1,0; 0,1,1,0,1,0; 1,0,0,1,0,1; 1,0,0,1,1,0; 0,1,1,0,1,1; 0,1,0,1,0,1];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n\r\n%%\r\nboard = [1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,0; 0,0,1,1,0,1,0,1; 1,1,0,1,0,0,1,0; 1,0,1,0,0,1,0,1; 0,1,0,1,0,1,1,0; 1,0,1,0,1,0,0,1; 0,1,0,1,0,1,0,1];\r\nassert(isequal(tic_tac_logic_check(board),0))\r\n","published":true,"deleted":false,"likes_count":6,"comments_count":6,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":30,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-02-22T04:12:50.000Z","updated_at":"2025-11-01T18:08:07.000Z","published_at":"2015-02-22T04:12:50.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.gif\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/media/image2.gif\"}],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.conceptispuzzles.com/index.aspx?uri=puzzle/tic-tac-logic/rules\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eTic-Tac-Logic\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is a logic puzzle wherein a rectangular grid containing a certain set of pre-filled squares must be filled in completely to have no more than two consecutive X's or O's in any row or column. Also, the number of X's and O's must be the same in every row and column (equal to half the size of the row or column). Finally, all rows must be unique (compared to other rows) and all columns must be unique (compared to other columns).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAn example puzzle from Conceptis is included here, wherein the first board represents the starting condition and the second board represents a properly solved board:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou will be provided with a variety of completed boards. X's are represented by ones and O's by zeros. Write a function to test whether the board has been properly solved. Remember to check against all three criteria.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"},{\"partUri\":\"/media/image1.gif\",\"contentType\":\"image/gif\",\"content\":\"data:image/gif;base64,R0lGODlhyADIAPcAAJNz0mY7wGtBwkgVs62V3nFKxdDK0WZQaMa26JmJmlUluDASMot5jdXN1dHE7evj+Lyp5KygrsjByfXy/KCE2DodPObg5ksvTLmk4/Ls+yYHKZWElnpofIVizYJug+3o+HpUybyyvXhkefz4/rGksuHZ9iMDJYFezMC2wSgIKvPx88/Iz0wxTvHu8cK6xNvV22RNZqibqreruO7s7uHb4KOI2kwZtaGSosS5xI5r0OLZ88q56V4xvdjM8aSWpbWg4UIlRHdieN3T8tvQ8dLM0ykJK6aM2risuJ6A1sG4wod1iXNedWE0vrOe4b+t5WFJYn9rgPj4/VA2U1gpui8QMVIht5OClejh9+Xd9n5Zy00cti0PMFQ6Vpp81WtUbLKb4Me36c/B7JZ41I98keLd4oh2isGw5lpCXD4iQcS8xYRyhUQoRqqeq1ksu1Y9W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Yjfffcvdhwsu7OE34XUX8oQSgxe++B4g6PPH4pHf0koUikvOdx8dOKJGuGyzsg4UoYs+Oumlmw666amrPvo6qK/+eumuwz576LLT/nrrt8/Oeec8AfE78MELPzzxxRt/PPLJK7888807/zzzZEs/PfXVW3899tlrvz333Xv/Pfjhiz8++eWbfz766au/Pvvtu//+9wEBADs=\"}]}"}],"no_progress_badge":{"id":53,"name":"Unknown","symbol":"unknown","description":"Partially completed groups","description_html":null,"image_location":"/images/responsive/supporting/matlabcentral/cody/badges/problem_groups_unknown_2.png","bonus":null,"players_count":0,"active":false,"created_by":null,"updated_by":null,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"created_at":"2018-01-10T23:20:29.000Z","updated_at":"2018-01-10T23:20:29.000Z","community_badge_id":null,"award_multiples":false}}