Skip to content

Instantly share code, notes, and snippets.

@chessai
Last active May 2, 2020 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chessai/634aa1149ace1ed4c5af6e55adb761fa to your computer and use it in GitHub Desktop.
Save chessai/634aa1149ace1ed4c5af6e55adb761fa to your computer and use it in GitHub Desktop.
{-# language QuasiQuotes #-}
import Examples.Sudoku
import Text.RawString.QQ (r)
-- | The world's hardest sudoku problem, with only 4 starting numbers.
-- Found here: youtube.com/watch?v=hAyZ9K2EBF0
ultimateProblem :: String
ultimateProblem = [r|
.........
.........
.........
384......
.........
.........
.........
.........
........2|]
-- outputs:
--
-- 836972415
-- 971345826
-- 425618937
-- 384256791
-- 167489253
-- 259137684
-- 612594378
-- 548723169
-- 793861542
main :: IO ()
main = do
solvePuzzle . txtToBoard . tail . lines $ ultimateProblem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment