KöMaL - Középiskolai Matematikai és Fizikai Lapok
Sign In
Sign Up
 Magyar
Information
Contest
Journal
Articles

 

Problem S. 29. (October 2007)

S. 29. Readers of our Journal might remember Problem I. 136. about the Sudoku game. The aim of this well-known puzzle is to fill in a 9×9 grid with digits between 1 and 9 so that each row, column and 3×3 subgrid contain only one instance of each digit.

Write a program that solves a partially completed Sudoku grid according to the following rules:

- if there is a unique solution, then the output should be the complete grid (that is, 9×9 digits, given in 9 rows),

- if the solution is not unique, then a possible solution should be displayed in 9 rows, while a warning ``Solution is not unique'' in the 10th row,

- if there is no solution, then simply display ``No solution''.

The name of the input text file is given as the first argument in the command line. This file contains 9 rows with given digits. Dots denote missing digits. The output should be written to the standard output.

You should submit the source code of the program (s29.pas, s29.cpp, ...), a short documentation of your solution (s29.txt, s29.pdf, ...) and the name and version number of the compiler (e.g., Free Pascal 2.0, Borland C++ 3.1, ...).

(10 pont)

Deadline expired on 15 November 2007.


Sorry, the solution is available only in Hungarian. Google translation

Megoldás. A versenyzők többsége visszalépéses kereséssel oldotta meg a feladatot.

Mintaként Fábián András (s29.pas) szegedi versenyző programját közöljük.


Statistics:

6 students sent a solution.
10 points:Fábián András, Godó Zita, Strenner Péter, Sztupovszki Szabolcs.
9 points:Szebeni Szilveszter.
2 points:1 student.

Our web pages are supported by:   Ericsson   Cognex   Emberi Erőforrás Támogatáskezelő   Emberi Erőforrások Minisztériuma   Nemzeti Tehetség Program    
MTA Energiatudományi Kutatóközpont   MTA Wigner Fizikai Kutatóközpont     Nemzeti
Kulturális Alap   ELTE   Morgan Stanley