From 1b5109d410ebb04f741408727e6378f066a30991 Mon Sep 17 00:00:00 2001
From: "W. Trevor King" Due Friday, October 2, 2009 Due Friday, October 8, 2010Assignment #1
-Assignment #2
+Purpose
@@ -14,7 +14,7 @@ command on all the nodes of a virtual machine. The command to execute
will be extracted from the command line arguments. For instance,
-mpicc -np 4 ./submit rm /tmp/a +mpiexec -np 4 ./submit rm /tmp/a
will remove the file a
from the local
diff --git a/assignments/archive/sudoku/1.cfg b/assignments/archive/sudoku/1.cfg
new file mode 100644
index 0000000..2fd0850
--- /dev/null
+++ b/assignments/archive/sudoku/1.cfg
@@ -0,0 +1,20 @@
+
+ - - - - 2 8 - 5 -
+
+ - 7 4 6 1 - 2 8 -
+
+ - - 2 - 7 - 9 - 1
+
+
+ - 8 - - - - 3 9 5
+
+ - - 5 7 - 6 1 - -
+
+ 3 4 1 - - - - 2 -
+
+
+ 4 - 9 - 8 - 5 - -
+
+ - 2 8 - 5 3 6 7 -
+
+ - 5 - 4 6 - - - -
diff --git a/assignments/archive/sudoku/2.cfg b/assignments/archive/sudoku/2.cfg
new file mode 100644
index 0000000..714a72a
--- /dev/null
+++ b/assignments/archive/sudoku/2.cfg
@@ -0,0 +1,20 @@
+
+ - 6 - - 3 - - - -
+
+ - 3 1 9 - 8 - 5 -
+
+ 2 7 - - - - 6 3 -
+
+
+ - - - - 9 1 - - 3
+
+ - 1 - - 2 - - 9 -
+
+ 9 - - 6 8 - - - -
+
+
+ - 9 6 - - - - 4 7
+
+ - 4 - 2 - 9 5 6 -
+
+ - - - - 1 - - 8 -
diff --git a/assignments/archive/sudoku/3.cfg b/assignments/archive/sudoku/3.cfg
new file mode 100644
index 0000000..2e21724
--- /dev/null
+++ b/assignments/archive/sudoku/3.cfg
@@ -0,0 +1,20 @@
+
+ - 2 - - - - 6 - 9
+
+ 3 - - 9 - 4 - 5 -
+
+ - - - 8 1 - - - -
+
+
+ 6 - - 5 - - - 1 -
+
+ 8 1 - 3 - 9 - 6 5
+
+ - 4 - - - 1 - - 3
+
+
+ - - - - 7 6 - - -
+
+ - 6 - 4 - 5 - - 8
+
+ 9 - 1 - - - - 7 -
diff --git a/assignments/archive/sudoku/index.shtml b/assignments/archive/sudoku/index.shtml
new file mode 100644
index 0000000..45b35f1
--- /dev/null
+++ b/assignments/archive/sudoku/index.shtml
@@ -0,0 +1,134 @@
+
+
+
Due Friday, October 8, 2010
+ +Remind ourselves of the C or C ++ syntax, in particular: arrays, +loop, conditional, functions, ...
+ +Note: Please identify all your work.
+ +Write a C or C ++ code to +solve sudoku +puzzles.
+ +Sudoku is a one player board puzzle in which the player fills in +the empty cells on a 9x9 board with digits 1 to 9. The rules are +simple:
+ +The tiles in the rules refer to 3x3 sub-regions that cover +the 9x9 board with no overlap. A game is seeded by having some digits +1 to 9 placed on the board (satisfying the rules above). The player +needs to complete the filling the board with digits 1 to 9 while +respecting the rules above.
+ +A simple file interface should prove sufficient to check your +code. Namely, the initial configuration of digits on the board could +be typed in a file with an obvious format
+ ++- - 1 3 - - - 6 - +- 5 - - - 1 - - 3 +... ++ +
The output of any configuration could follow the same format.
+ +A run would then be
+ ++cat initialboard | ./sudoku ++ +
Please write a modular code. Functions could be
+ +geometry()
read_config()
print_config()
is_forbiden()
check_cell()
check_all_cells()
+5 3 - - 7 - - - - +6 - - 1 9 5 - - - +- 9 8 - - - - 6 - + +8 - - - 6 - - - 3 +4 - - 8 - 3 - - 1 +7 - - - 2 - - - 6 + +- 6 - - - - 2 8 - +- - - 4 1 9 - - 5 +- - - - 8 - - 7 9 ++ +
+5 3 4 6 7 8 9 1 2 +6 7 2 1 9 5 3 4 8 +1 9 8 3 4 2 5 6 7 + +8 5 9 7 6 1 4 2 3 +4 2 6 8 5 3 7 9 1 +7 1 3 9 2 4 8 5 6 + +9 6 1 5 3 7 2 8 4 +2 8 7 4 1 9 6 3 5 +3 4 5 2 8 6 1 7 9 ++ + + + diff --git a/assignments/current/1 b/assignments/current/1 index fe9059c..4e538d1 120000 --- a/assignments/current/1 +++ b/assignments/current/1 @@ -1 +1 @@ -../archive/submit_command/ \ No newline at end of file +../archive/sudoku/ \ No newline at end of file diff --git a/assignments/current/2 b/assignments/current/2 index 7b06667..13520d3 120000 --- a/assignments/current/2 +++ b/assignments/current/2 @@ -1 +1 @@ -../archive/average_and_standard_deviation/ \ No newline at end of file +../archive/submit_command \ No newline at end of file -- 2.26.2