1. Network of Schools - 2. Magic Squares
Figure 1 gives a possible input file and the corresponding output file.
INPUT.TXT
5
2 4 3 0
4 5 0
0
0
1 0
OUTPUT.TXT
1
2
Figure 1
1 | 2 | 3 | 4 |
8 | 7 | 6 | 5 |
Figure 3: Initial configuration
Three basic transformations, identified by the letters 'A', 'B' and 'C', can be applied to a sheet:
All configurations are available using the three basic transformations.
A: |
|
B: |
|
C: |
|
Figure 4: Basic transformations
INPUT.TXT OUTPUT.TXT 2 6 8 4 5 7 3 1 7 B C A B C C B
Figure 5: Example Input and Output