程序代写代做代考 Component

Component
Points
csce322hw04pt01.pl
Test Cases
Total csce322hw04pt02.pl Test Cases
Total
csce322hw04pt03.pl
Test Cases Total
30¡Á1 30
30¡Á1 30
40¡Á1 40
Total
100%
1

Contents
1 Metadata 3
1.1 SubmittedFiles…………………………………………….. 3
1.2 webgraderRuns…………………………………………….. 3
1.3 diffs …………………………………………………. 3
2 webgrader Run 5
3 csce322hw04pt01.pl 6
3.1 part01test01………………………………………………. 6
3.1.1 Diff ………………………………………………. 6
3.1.2 InputFile……………………………………………. 6
3.1.3 SubmissionOutput……………………………………….. 6
3.1.4 SolutionOutput ………………………………………… 6
3.1.5 stderr …………………………………………….. 6
3.2 part01test02………………………………………………. 7
3.2.1 Diff ………………………………………………. 7
3.2.2 InputFile……………………………………………. 7
3.2.3 SubmissionOutput……………………………………….. 7
3.2.4 SolutionOutput ………………………………………… 7
3.2.5 stderr …………………………………………….. 7
3.3 part01test03………………………………………………. 7
3.3.1 Diff ………………………………………………. 7
3.3.2 InputFile……………………………………………. 7
3.3.3 SubmissionOutput……………………………………….. 8
3.3.4 SolutionOutput ………………………………………… 8
3.3.5 stderr …………………………………………….. 8
3.4 part01test04………………………………………………. 8
3.4.1 Diff ………………………………………………. 8
3.4.2 InputFile……………………………………………. 8
3.4.3 SubmissionOutput……………………………………….. 9
3.4.4 SolutionOutput ………………………………………… 9
3.4.5 stderr …………………………………………….. 9
3.5 part01test05………………………………………………. 9
3.5.1 Diff ………………………………………………. 9
3.5.2 InputFile……………………………………………. 9
3.5.3 SubmissionOutput……………………………………….. 9
3.5.4 SolutionOutput ………………………………………… 10
3.5.5 stderr …………………………………………….. 10
3.6 part01test06………………………………………………. 10 3.6.1 Diff ………………………………………………. 10 3.6.2 InputFile……………………………………………. 10 3.6.3 SubmissionOutput……………………………………….. 10 3.6.4 SolutionOutput ………………………………………… 10 3.6.5 stderr …………………………………………….. 10
3.7 part01test07………………………………………………. 11 3.7.1 Diff ………………………………………………. 11 3.7.2 InputFile……………………………………………. 11 3.7.3 SubmissionOutput……………………………………….. 11
2

3.7.4 SolutionOutput ………………………………………… 11
3.7.5 stderr …………………………………………….. 11
3.8 part01test08………………………………………………. 11 3.8.1 Diff ………………………………………………. 11 3.8.2 InputFile……………………………………………. 11 3.8.3 SubmissionOutput……………………………………….. 12 3.8.4 SolutionOutput ………………………………………… 12 3.8.5 stderr …………………………………………….. 12
3.9 part01test09………………………………………………. 12 3.9.1 Diff ………………………………………………. 12 3.9.2 InputFile……………………………………………. 12 3.9.3 SubmissionOutput……………………………………….. 13 3.9.4 SolutionOutput ………………………………………… 13 3.9.5 stderr …………………………………………….. 13
3.10part01test10………………………………………………. 13 3.10.1Diff ………………………………………………. 13 3.10.2InputFile……………………………………………. 13 3.10.3 SubmissionOutput……………………………………….. 13 3.10.4SolutionOutput ………………………………………… 14 3.10.5stderr …………………………………………….. 14 3.11part01test11………………………………………………. 14 3.11.1Diff ………………………………………………. 14 3.11.2InputFile……………………………………………. 14 3.11.3 SubmissionOutput……………………………………….. 14 3.11.4SolutionOutput ………………………………………… 14 3.11.5stderr …………………………………………….. 14 3.12part01test12………………………………………………. 15 3.12.1Diff ………………………………………………. 15 3.12.2InputFile……………………………………………. 15 3.12.3 SubmissionOutput……………………………………….. 15 3.12.4SolutionOutput ………………………………………… 15 3.12.5stderr …………………………………………….. 15 3.13part01test13………………………………………………. 15 3.13.1Diff ………………………………………………. 15 3.13.2InputFile……………………………………………. 15 3.13.3 SubmissionOutput……………………………………….. 16 3.13.4SolutionOutput ………………………………………… 16 3.13.5stderr …………………………………………….. 16 3.14part01test14………………………………………………. 16 3.14.1Diff ………………………………………………. 16 3.14.2InputFile……………………………………………. 16 3.14.3 SubmissionOutput……………………………………….. 17 3.14.4SolutionOutput ………………………………………… 17 3.14.5stderr …………………………………………….. 17 3.15part01test15………………………………………………. 17 3.15.1Diff ………………………………………………. 17 3.15.2InputFile……………………………………………. 17 3.15.3 SubmissionOutput……………………………………….. 17 3.15.4SolutionOutput ………………………………………… 18 3.15.5stderr …………………………………………….. 18 3.16part01test16………………………………………………. 18 3.16.1Diff ………………………………………………. 18 3.16.2InputFile……………………………………………. 18 3.16.3 SubmissionOutput……………………………………….. 18 3.16.4SolutionOutput ………………………………………… 18 3.16.5stderr …………………………………………….. 18 3.17part01test17………………………………………………. 19 3.17.1Diff ………………………………………………. 19 3.17.2InputFile……………………………………………. 19 3.17.3 SubmissionOutput……………………………………….. 19
3

3.17.4SolutionOutput ………………………………………… 19
3.17.5stderr …………………………………………….. 19 3.18part01test18………………………………………………. 19 3.18.1Diff ………………………………………………. 19 3.18.2InputFile……………………………………………. 19 3.18.3 SubmissionOutput……………………………………….. 20 3.18.4SolutionOutput ………………………………………… 20 3.18.5stderr …………………………………………….. 20 3.19part01test19………………………………………………. 20 3.19.1Diff ………………………………………………. 20 3.19.2InputFile……………………………………………. 20 3.19.3 SubmissionOutput……………………………………….. 21 3.19.4SolutionOutput ………………………………………… 21 3.19.5stderr …………………………………………….. 21 3.20part01test20………………………………………………. 21 3.20.1Diff ………………………………………………. 21 3.20.2InputFile……………………………………………. 21 3.20.3 SubmissionOutput……………………………………….. 21 3.20.4SolutionOutput ………………………………………… 22 3.20.5stderr …………………………………………….. 22 3.21part01test21………………………………………………. 22 3.21.1Diff ………………………………………………. 22 3.21.2InputFile……………………………………………. 22 3.21.3 SubmissionOutput……………………………………….. 22 3.21.4SolutionOutput ………………………………………… 22 3.21.5stderr …………………………………………….. 22 3.22part01test22………………………………………………. 23 3.22.1Diff ………………………………………………. 23 3.22.2InputFile……………………………………………. 23 3.22.3 SubmissionOutput……………………………………….. 23 3.22.4SolutionOutput ………………………………………… 23 3.22.5stderr …………………………………………….. 23 3.23part01test23………………………………………………. 23 3.23.1Diff ………………………………………………. 23 3.23.2InputFile……………………………………………. 23 3.23.3 SubmissionOutput……………………………………….. 24 3.23.4SolutionOutput ………………………………………… 24 3.23.5stderr …………………………………………….. 24 3.24part01test24………………………………………………. 24 3.24.1Diff ………………………………………………. 24 3.24.2InputFile……………………………………………. 24 3.24.3 SubmissionOutput……………………………………….. 25 3.24.4SolutionOutput ………………………………………… 25 3.24.5stderr …………………………………………….. 25 3.25part01test25………………………………………………. 25 3.25.1Diff ………………………………………………. 25 3.25.2InputFile……………………………………………. 25 3.25.3 SubmissionOutput……………………………………….. 25 3.25.4SolutionOutput ………………………………………… 26 3.25.5stderr …………………………………………….. 26 3.26part01test26………………………………………………. 26 3.26.1Diff ………………………………………………. 26 3.26.2InputFile……………………………………………. 26 3.26.3 SubmissionOutput……………………………………….. 26 3.26.4SolutionOutput ………………………………………… 26 3.26.5stderr …………………………………………….. 26 3.27part01test27………………………………………………. 27 3.27.1Diff ………………………………………………. 27 3.27.2InputFile……………………………………………. 27 3.27.3 SubmissionOutput……………………………………….. 27
4

3.27.4SolutionOutput ………………………………………… 27
3.27.5stderr …………………………………………….. 27 3.28part01test28………………………………………………. 27 3.28.1Diff ………………………………………………. 27 3.28.2InputFile……………………………………………. 27 3.28.3 SubmissionOutput……………………………………….. 28 3.28.4SolutionOutput ………………………………………… 28 3.28.5stderr …………………………………………….. 28 3.29part01test29………………………………………………. 28 3.29.1Diff ………………………………………………. 28 3.29.2InputFile……………………………………………. 28 3.29.3 SubmissionOutput……………………………………….. 29 3.29.4SolutionOutput ………………………………………… 29 3.29.5stderr …………………………………………….. 29 3.30part01test30………………………………………………. 29 3.30.1Diff ………………………………………………. 29 3.30.2InputFile……………………………………………. 29 3.30.3 SubmissionOutput……………………………………….. 29 3.30.4SolutionOutput ………………………………………… 30 3.30.5stderr …………………………………………….. 30 3.31SourceCode………………………………………………. 30
4 csce322hw04pt02.pl 31
4.1 part02test01………………………………………………. 31 4.1.1 Diff ………………………………………………. 31 4.1.2 InputFile……………………………………………. 31 4.1.3 SubmissionOutput……………………………………….. 31 4.1.4 SolutionOutput ………………………………………… 31 4.1.5 stderr …………………………………………….. 31
4.2 part02test02………………………………………………. 32 4.2.1 Diff ………………………………………………. 32 4.2.2 InputFile……………………………………………. 32 4.2.3 SubmissionOutput……………………………………….. 32 4.2.4 SolutionOutput ………………………………………… 32 4.2.5 stderr …………………………………………….. 32
4.3 part02test03………………………………………………. 32 4.3.1 Diff ………………………………………………. 32 4.3.2 InputFile……………………………………………. 32 4.3.3 SubmissionOutput……………………………………….. 33 4.3.4 SolutionOutput ………………………………………… 33 4.3.5 stderr …………………………………………….. 33
4.4 part02test04………………………………………………. 33 4.4.1 Diff ………………………………………………. 33 4.4.2 InputFile……………………………………………. 33 4.4.3 SubmissionOutput……………………………………….. 34 4.4.4 SolutionOutput ………………………………………… 34 4.4.5 stderr …………………………………………….. 34
4.5 part02test05………………………………………………. 34 4.5.1 Diff ………………………………………………. 34 4.5.2 InputFile……………………………………………. 34 4.5.3 SubmissionOutput……………………………………….. 34 4.5.4 SolutionOutput ………………………………………… 35 4.5.5 stderr …………………………………………….. 35
4.6 part02test06………………………………………………. 35 4.6.1 Diff ………………………………………………. 35 4.6.2 InputFile……………………………………………. 35 4.6.3 SubmissionOutput……………………………………….. 35 4.6.4 SolutionOutput ………………………………………… 35 4.6.5 stderr …………………………………………….. 35
4.7 part02test07………………………………………………. 36
5

4.7.1 Diff ………………………………………………. 36 4.7.2 InputFile……………………………………………. 36 4.7.3 SubmissionOutput……………………………………….. 36 4.7.4 SolutionOutput ………………………………………… 36 4.7.5 stderr …………………………………………….. 36
4.8 part02test08………………………………………………. 36 4.8.1 Diff ………………………………………………. 36 4.8.2 InputFile……………………………………………. 36 4.8.3 SubmissionOutput……………………………………….. 37 4.8.4 SolutionOutput ………………………………………… 37 4.8.5 stderr …………………………………………….. 37
4.9 part02test09………………………………………………. 37 4.9.1 Diff ………………………………………………. 37 4.9.2 InputFile……………………………………………. 37 4.9.3 SubmissionOutput……………………………………….. 38 4.9.4 SolutionOutput ………………………………………… 38 4.9.5 stderr …………………………………………….. 38
4.10part02test10………………………………………………. 38 4.10.1Diff ………………………………………………. 38 4.10.2InputFile……………………………………………. 38 4.10.3 SubmissionOutput……………………………………….. 38 4.10.4SolutionOutput ………………………………………… 39 4.10.5stderr …………………………………………….. 39
4.11part02test11………………………………………………. 39 4.11.1Diff ………………………………………………. 39 4.11.2InputFile……………………………………………. 39 4.11.3 SubmissionOutput……………………………………….. 39 4.11.4SolutionOutput ………………………………………… 39 4.11.5stderr …………………………………………….. 39
4.12part02test12………………………………………………. 40 4.12.1Diff ………………………………………………. 40 4.12.2InputFile……………………………………………. 40 4.12.3 SubmissionOutput……………………………………….. 40 4.12.4SolutionOutput ………………………………………… 40 4.12.5stderr …………………………………………….. 40
4.13part02test13………………………………………………. 40 4.13.1Diff ………………………………………………. 40 4.13.2InputFile……………………………………………. 40 4.13.3 SubmissionOutput……………………………………….. 41 4.13.4SolutionOutput ………………………………………… 41 4.13.5stderr …………………………………………….. 41
4.14part02test14………………………………………………. 41 4.14.1Diff ………………………………………………. 41 4.14.2InputFile……………………………………………. 41 4.14.3 SubmissionOutput……………………………………….. 42 4.14.4SolutionOutput ………………………………………… 42 4.14.5stderr …………………………………………….. 42
4.15part02test15………………………………………………. 42 4.15.1Diff ………………………………………………. 42 4.15.2InputFile……………………………………………. 42 4.15.3 SubmissionOutput……………………………………….. 42 4.15.4SolutionOutput ………………………………………… 43 4.15.5stderr …………………………………………….. 43
4.16part02test16………………………………………………. 43 4.16.1Diff ………………………………………………. 43 4.16.2InputFile……………………………………………. 43 4.16.3 SubmissionOutput……………………………………….. 43 4.16.4SolutionOutput ………………………………………… 43 4.16.5stderr …………………………………………….. 43
4.17part02test17………………………………………………. 44 6

4.17.1Diff ………………………………………………. 44 4.17.2InputFile……………………………………………. 44 4.17.3 SubmissionOutput……………………………………….. 44 4.17.4SolutionOutput ………………………………………… 44 4.17.5stderr …………………………………………….. 44
4.18part02test18………………………………………………. 44 4.18.1Diff ………………………………………………. 44 4.18.2InputFile……………………………………………. 44 4.18.3 SubmissionOutput……………………………………….. 45 4.18.4SolutionOutput ………………………………………… 45 4.18.5stderr …………………………………………….. 45
4.19part02test19………………………………………………. 45 4.19.1Diff ………………………………………………. 45 4.19.2InputFile……………………………………………. 45 4.19.3 SubmissionOutput……………………………………….. 46 4.19.4SolutionOutput ………………………………………… 46 4.19.5stderr …………………………………………….. 46
4.20part02test20………………………………………………. 46 4.20.1Diff ………………………………………………. 46 4.20.2InputFile……………………………………………. 46 4.20.3 SubmissionOutput……………………………………….. 46 4.20.4SolutionOutput ………………………………………… 47 4.20.5stderr …………………………………………….. 47
4.21part02test21………………………………………………. 47 4.21.1Diff ………………………………………………. 47 4.21.2InputFile……………………………………………. 47 4.21.3 SubmissionOutput……………………………………….. 47 4.21.4SolutionOutput ………………………………………… 47 4.21.5stderr …………………………………………….. 47
4.22part02test22………………………………………………. 48 4.22.1Diff ………………………………………………. 48 4.22.2InputFile……………………………………………. 48 4.22.3 SubmissionOutput……………………………………….. 48 4.22.4SolutionOutput ………………………………………… 48 4.22.5stderr …………………………………………….. 48
4.23part02test23………………………………………………. 48 4.23.1Diff ………………………………………………. 48 4.23.2InputFile……………………………………………. 48 4.23.3 SubmissionOutput……………………………………….. 49 4.23.4SolutionOutput ………………………………………… 49 4.23.5stderr …………………………………………….. 49
4.24part02test24………………………………………………. 49 4.24.1Diff ………………………………………………. 49 4.24.2InputFile……………………………………………. 49 4.24.3 SubmissionOutput……………………………………….. 50 4.24.4SolutionOutput ………………………………………… 50 4.24.5stderr …………………………………………….. 50
4.25part02test25………………………………………………. 50 4.25.1Diff ………………………………………………. 50 4.25.2InputFile……………………………………………. 50 4.25.3 SubmissionOutput……………………………………….. 50 4.25.4SolutionOutput ………………………………………… 51 4.25.5stderr …………………………………………….. 51
4.26part02test26………………………………………………. 51 4.26.1Diff ………………………………………………. 51 4.26.2InputFile……………………………………………. 51 4.26.3 SubmissionOutput……………………………………….. 51 4.26.4SolutionOutput ………………………………………… 51 4.26.5stderr …………………………………………….. 51
4.27part02test27………………………………………………. 52 7

4.27.1Diff ………………………………………………. 52 4.27.2InputFile……………………………………………. 52 4.27.3 SubmissionOutput……………………………………….. 52 4.27.4SolutionOutput ………………………………………… 52 4.27.5stderr …………………………………………….. 52
4.28part02test28………………………………………………. 52 4.28.1Diff ………………………………………………. 52 4.28.2InputFile……………………………………………. 52 4.28.3 SubmissionOutput……………………………………….. 53 4.28.4SolutionOutput ………………………………………… 53 4.28.5stderr …………………………………………….. 53
4.29part02test29………………………………………………. 53 4.29.1Diff ………………………………………………. 53 4.29.2InputFile……………………………………………. 53 4.29.3 SubmissionOutput……………………………………….. 54 4.29.4SolutionOutput ………………………………………… 54 4.29.5stderr …………………………………………….. 54
4.30part02test30………………………………………………. 54 4.30.1Diff ………………………………………………. 54 4.30.2InputFile……………………………………………. 54 4.30.3 SubmissionOutput……………………………………….. 54 4.30.4SolutionOutput ………………………………………… 55 4.30.5stderr …………………………………………….. 55
4.31SourceCode………………………………………………. 55
5 csce322hw04pt03.pl 56
5.1 part03test01………………………………………………. 56 5.1.1 Diff ………………………………………………. 56 5.1.2 InputFile……………………………………………. 56 5.1.3 SubmissionOutput……………………………………….. 56 5.1.4 SolutionOutput ………………………………………… 56 5.1.5 stderr …………………………………………….. 57
5.2 part03test02………………………………………………. 57 5.2.1 Diff ………………………………………………. 57 5.2.2 InputFile……………………………………………. 57 5.2.3 SubmissionOutput……………………………………….. 57 5.2.4 SolutionOutput ………………………………………… 58 5.2.5 stderr …………………………………………….. 58
5.3 part03test03………………………………………………. 58 5.3.1 Diff ………………………………………………. 58 5.3.2 InputFile……………………………………………. 58 5.3.3 SubmissionOutput……………………………………….. 58 5.3.4 SolutionOutput ………………………………………… 59 5.3.5 stderr …………………………………………….. 59
5.4 part03test04………………………………………………. 59 5.4.1 Diff ………………………………………………. 59 5.4.2 InputFile……………………………………………. 59 5.4.3 SubmissionOutput……………………………………….. 59 5.4.4 SolutionOutput ………………………………………… 60 5.4.5 stderr …………………………………………….. 60
5.5 part03test05………………………………………………. 60 5.5.1 Diff ………………………………………………. 60 5.5.2 InputFile……………………………………………. 60 5.5.3 SubmissionOutput……………………………………….. 60 5.5.4 SolutionOutput ………………………………………… 61 5.5.5 stderr …………………………………………….. 61
5.6 part03test06………………………………………………. 61 5.6.1 Diff ………………………………………………. 61 5.6.2 InputFile……………………………………………. 61 5.6.3 SubmissionOutput……………………………………….. 61
8

5.6.4 SolutionOutput ………………………………………… 62
5.6.5 stderr …………………………………………….. 62
5.7 part03test07………………………………………………. 62 5.7.1 Diff ………………………………………………. 62 5.7.2 InputFile……………………………………………. 62 5.7.3 SubmissionOutput……………………………………….. 62 5.7.4 SolutionOutput ………………………………………… 63 5.7.5 stderr …………………………………………….. 63
5.8 part03test08………………………………………………. 63 5.8.1 Diff ………………………………………………. 63 5.8.2 InputFile……………………………………………. 63 5.8.3 SubmissionOutput……………………………………….. 64 5.8.4 SolutionOutput ………………………………………… 64 5.8.5 stderr …………………………………………….. 64
5.9 part03test09………………………………………………. 64 5.9.1 Diff ………………………………………………. 64 5.9.2 InputFile……………………………………………. 64 5.9.3 SubmissionOutput……………………………………….. 65 5.9.4 SolutionOutput ………………………………………… 65 5.9.5 stderr …………………………………………….. 65
5.10part03test10………………………………………………. 65 5.10.1Diff ………………………………………………. 65 5.10.2InputFile……………………………………………. 65 5.10.3 SubmissionOutput……………………………………….. 66 5.10.4SolutionOutput ………………………………………… 66 5.10.5stderr …………………………………………….. 66 5.11part03test11………………………………………………. 66 5.11.1Diff ………………………………………………. 66 5.11.2InputFile……………………………………………. 67 5.11.3 SubmissionOutput……………………………………….. 67 5.11.4SolutionOutput ………………………………………… 67 5.11.5stderr …………………………………………….. 67 5.12part03test12………………………………………………. 68 5.12.1Diff ………………………………………………. 68 5.12.2InputFile……………………………………………. 68 5.12.3 SubmissionOutput……………………………………….. 68 5.12.4SolutionOutput ………………………………………… 68 5.12.5stderr …………………………………………….. 68 5.13part03test13………………………………………………. 69 5.13.1Diff ………………………………………………. 69 5.13.2InputFile……………………………………………. 69 5.13.3 SubmissionOutput……………………………………….. 69 5.13.4SolutionOutput ………………………………………… 69 5.13.5stderr …………………………………………….. 69 5.14part03test14………………………………………………. 70 5.14.1Diff ………………………………………………. 70 5.14.2InputFile……………………………………………. 70 5.14.3 SubmissionOutput……………………………………….. 70 5.14.4SolutionOutput ………………………………………… 70 5.14.5stderr …………………………………………….. 70 5.15part03test15………………………………………………. 71 5.15.1Diff ………………………………………………. 71 5.15.2InputFile……………………………………………. 71 5.15.3 SubmissionOutput……………………………………….. 71 5.15.4SolutionOutput ………………………………………… 71 5.15.5stderr …………………………………………….. 71 5.16part03test16………………………………………………. 72 5.16.1Diff ………………………………………………. 72 5.16.2InputFile……………………………………………. 72 5.16.3 SubmissionOutput……………………………………….. 72
9

5.16.4SolutionOutput ………………………………………… 72
5.16.5stderr …………………………………………….. 72 5.17part03test17………………………………………………. 73 5.17.1Diff ………………………………………………. 73 5.17.2InputFile……………………………………………. 73 5.17.3 SubmissionOutput……………………………………….. 73 5.17.4SolutionOutput ………………………………………… 73 5.17.5stderr …………………………………………….. 74 5.18part03test18………………………………………………. 74 5.18.1Diff ………………………………………………. 74 5.18.2InputFile……………………………………………. 74 5.18.3 SubmissionOutput……………………………………….. 74 5.18.4SolutionOutput ………………………………………… 74 5.18.5stderr …………………………………………….. 74 5.19part03test19………………………………………………. 75 5.19.1Diff ………………………………………………. 75 5.19.2InputFile……………………………………………. 75 5.19.3 SubmissionOutput……………………………………….. 75 5.19.4SolutionOutput ………………………………………… 75 5.19.5stderr …………………………………………….. 75 5.20part03test20………………………………………………. 76 5.20.1Diff ………………………………………………. 76 5.20.2InputFile……………………………………………. 76 5.20.3 SubmissionOutput……………………………………….. 76 5.20.4SolutionOutput ………………………………………… 76 5.20.5stderr …………………………………………….. 77 5.21part03test21………………………………………………. 77 5.21.1Diff ………………………………………………. 77 5.21.2InputFile……………………………………………. 77 5.21.3 SubmissionOutput……………………………………….. 77 5.21.4SolutionOutput ………………………………………… 77 5.21.5stderr …………………………………………….. 78 5.22part03test22………………………………………………. 78 5.22.1Diff ………………………………………………. 78 5.22.2InputFile……………………………………………. 78 5.22.3 SubmissionOutput……………………………………….. 78 5.22.4SolutionOutput ………………………………………… 79 5.22.5stderr …………………………………………….. 79 5.23part03test23………………………………………………. 79 5.23.1Diff ………………………………………………. 79 5.23.2InputFile……………………………………………. 79 5.23.3 SubmissionOutput……………………………………….. 79 5.23.4SolutionOutput ………………………………………… 80 5.23.5stderr …………………………………………….. 80 5.24part03test24………………………………………………. 80 5.24.1Diff ………………………………………………. 80 5.24.2InputFile……………………………………………. 80 5.24.3 SubmissionOutput……………………………………….. 80 5.24.4SolutionOutput ………………………………………… 81 5.24.5stderr …………………………………………….. 81 5.25part03test25………………………………………………. 81 5.25.1Diff ………………………………………………. 81 5.25.2InputFile……………………………………………. 81 5.25.3 SubmissionOutput……………………………………….. 81 5.25.4SolutionOutput ………………………………………… 82 5.25.5stderr …………………………………………….. 82 5.26part03test26………………………………………………. 82 5.26.1Diff ………………………………………………. 82 5.26.2InputFile……………………………………………. 82 5.26.3 SubmissionOutput……………………………………….. 83
10

5.26.4SolutionOutput ………………………………………… 83
5.26.5stderr …………………………………………….. 83 5.27part03test27………………………………………………. 83 5.27.1Diff ………………………………………………. 83 5.27.2InputFile……………………………………………. 83 5.27.3 SubmissionOutput……………………………………….. 84 5.27.4SolutionOutput ………………………………………… 84 5.27.5stderr …………………………………………….. 84 5.28part03test28………………………………………………. 85 5.28.1Diff ………………………………………………. 85 5.28.2InputFile……………………………………………. 85 5.28.3 SubmissionOutput……………………………………….. 85 5.28.4SolutionOutput ………………………………………… 85 5.28.5stderr …………………………………………….. 85 5.29part03test29………………………………………………. 86 5.29.1Diff ………………………………………………. 86 5.29.2InputFile……………………………………………. 86 5.29.3 SubmissionOutput……………………………………….. 86 5.29.4SolutionOutput ………………………………………… 86 5.29.5stderr …………………………………………….. 86 5.30part03test30………………………………………………. 87 5.30.1Diff ………………………………………………. 87 5.30.2InputFile……………………………………………. 87 5.30.3 SubmissionOutput……………………………………….. 87 5.30.4SolutionOutput ………………………………………… 87 5.30.5stderr …………………………………………….. 88 5.31part03test31………………………………………………. 88 5.31.1Diff ………………………………………………. 88 5.31.2InputFile……………………………………………. 88 5.31.3 SubmissionOutput……………………………………….. 88 5.31.4SolutionOutput ………………………………………… 88 5.31.5stderr …………………………………………….. 89 5.32part03test32………………………………………………. 89 5.32.1Diff ………………………………………………. 89 5.32.2InputFile……………………………………………. 89 5.32.3 SubmissionOutput……………………………………….. 89 5.32.4SolutionOutput ………………………………………… 89 5.32.5stderr …………………………………………….. 90 5.33part03test33………………………………………………. 90 5.33.1Diff ………………………………………………. 90 5.33.2InputFile……………………………………………. 90 5.33.3 SubmissionOutput……………………………………….. 90 5.33.4SolutionOutput ………………………………………… 91 5.33.5stderr …………………………………………….. 91 5.34part03test34………………………………………………. 91 5.34.1Diff ………………………………………………. 91 5.34.2InputFile……………………………………………. 91 5.34.3 SubmissionOutput……………………………………….. 91 5.34.4SolutionOutput ………………………………………… 92 5.34.5stderr …………………………………………….. 92 5.35part03test35………………………………………………. 92 5.35.1Diff ………………………………………………. 92 5.35.2InputFile……………………………………………. 92 5.35.3 SubmissionOutput……………………………………….. 92 5.35.4SolutionOutput ………………………………………… 92 5.35.5stderr …………………………………………….. 93 5.36part03test36………………………………………………. 93 5.36.1Diff ………………………………………………. 93 5.36.2InputFile……………………………………………. 93 5.36.3 SubmissionOutput……………………………………….. 93
11

5.36.4SolutionOutput ………………………………………… 93
5.36.5stderr …………………………………………….. 94 5.37part03test37………………………………………………. 94 5.37.1Diff ………………………………………………. 94 5.37.2InputFile……………………………………………. 94 5.37.3 SubmissionOutput……………………………………….. 94 5.37.4SolutionOutput ………………………………………… 94 5.37.5stderr …………………………………………….. 95 5.38part03test38………………………………………………. 95 5.38.1Diff ………………………………………………. 95 5.38.2InputFile……………………………………………. 95 5.38.3 SubmissionOutput……………………………………….. 95 5.38.4SolutionOutput ………………………………………… 96 5.38.5stderr …………………………………………….. 96 5.39part03test39………………………………………………. 96 5.39.1Diff ………………………………………………. 96 5.39.2InputFile……………………………………………. 96 5.39.3 SubmissionOutput……………………………………….. 96 5.39.4SolutionOutput ………………………………………… 97 5.39.5stderr …………………………………………….. 97 5.40part03test40………………………………………………. 97 5.40.1Diff ………………………………………………. 97 5.40.2InputFile……………………………………………. 97 5.40.3 SubmissionOutput……………………………………….. 98 5.40.4SolutionOutput ………………………………………… 98 5.40.5stderr …………………………………………….. 98 5.41SourceCode………………………………………………. 98
6 csce322hw04pt04.pl 102
6.1 part04test01………………………………………………. 102 6.1.1 Diff ………………………………………………. 102 6.1.2 InputFile……………………………………………. 102 6.1.3 SubmissionOutput……………………………………….. 102 6.1.4 SolutionOutput ………………………………………… 102 6.1.5 stderr …………………………………………….. 102
6.2 part04test02………………………………………………. 103 6.2.1 Diff ………………………………………………. 103 6.2.2 InputFile……………………………………………. 103 6.2.3 SubmissionOutput……………………………………….. 103 6.2.4 SolutionOutput ………………………………………… 103 6.2.5 stderr …………………………………………….. 103
6.3 part04test03………………………………………………. 104 6.3.1 Diff ………………………………………………. 104 6.3.2 InputFile……………………………………………. 104 6.3.3 SubmissionOutput……………………………………….. 104 6.3.4 SolutionOutput ………………………………………… 104 6.3.5 stderr …………………………………………….. 104
6.4 part04test04………………………………………………. 105 6.4.1 Diff ………………………………………………. 105 6.4.2 InputFile……………………………………………. 105 6.4.3 SubmissionOutput……………………………………….. 105 6.4.4 SolutionOutput ………………………………………… 105 6.4.5 stderr …………………………………………….. 105
6.5 part04test05………………………………………………. 105 6.5.1 Diff ………………………………………………. 105 6.5.2 InputFile……………………………………………. 106 6.5.3 SubmissionOutput……………………………………….. 106 6.5.4 SolutionOutput ………………………………………… 106 6.5.5 stderr …………………………………………….. 106
6.6 part04test06………………………………………………. 106
12

6.6.1 Diff ………………………………………………. 106 6.6.2 InputFile……………………………………………. 106 6.6.3 SubmissionOutput……………………………………….. 107 6.6.4 SolutionOutput ………………………………………… 107 6.6.5 stderr …………………………………………….. 107
6.7 part04test07………………………………………………. 107 6.7.1 Diff ………………………………………………. 107 6.7.2 InputFile……………………………………………. 107 6.7.3 SubmissionOutput……………………………………….. 108 6.7.4 SolutionOutput ………………………………………… 108 6.7.5 stderr …………………………………………….. 108
6.8 part04test08………………………………………………. 108 6.8.1 Diff ………………………………………………. 108 6.8.2 InputFile……………………………………………. 108 6.8.3 SubmissionOutput……………………………………….. 109 6.8.4 SolutionOutput ………………………………………… 109 6.8.5 stderr …………………………………………….. 109
6.9 part04test09………………………………………………. 109 6.9.1 Diff ………………………………………………. 109 6.9.2 InputFile……………………………………………. 109 6.9.3 SubmissionOutput……………………………………….. 110 6.9.4 SolutionOutput ………………………………………… 110 6.9.5 stderr …………………………………………….. 110
6.10part04test10………………………………………………. 110 6.10.1Diff ………………………………………………. 110 6.10.2InputFile……………………………………………. 110 6.10.3 SubmissionOutput……………………………………….. 110 6.10.4 SolutionOutput ………………………………………… 111 6.10.5stderr …………………………………………….. 111
6.11part04test11………………………………………………. 111 6.11.1Diff ………………………………………………. 111 6.11.2InputFile……………………………………………. 111 6.11.3 SubmissionOutput……………………………………….. 111 6.11.4 SolutionOutput ………………………………………… 112 6.11.5stderr …………………………………………….. 112
6.12part04test12………………………………………………. 112 6.12.1Diff ………………………………………………. 112 6.12.2InputFile……………………………………………. 112 6.12.3 SubmissionOutput……………………………………….. 112 6.12.4 SolutionOutput ………………………………………… 113 6.12.5stderr …………………………………………….. 113
6.13part04test13………………………………………………. 113 6.13.1Diff ………………………………………………. 113 6.13.2InputFile……………………………………………. 113 6.13.3 SubmissionOutput……………………………………….. 113 6.13.4 SolutionOutput ………………………………………… 113 6.13.5stderr …………………………………………….. 114
6.14part04test14………………………………………………. 114 6.14.1Diff ………………………………………………. 114 6.14.2InputFile……………………………………………. 114 6.14.3 SubmissionOutput……………………………………….. 114 6.14.4 SolutionOutput ………………………………………… 114 6.14.5stderr …………………………………………….. 115
6.15part04test15………………………………………………. 115 6.15.1Diff ………………………………………………. 115 6.15.2InputFile……………………………………………. 115 6.15.3 SubmissionOutput……………………………………….. 115 6.15.4 SolutionOutput ………………………………………… 115 6.15.5stderr …………………………………………….. 116
6.16SourceCode………………………………………………. 116 13

1 2 3 4 5 6 7 8 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
1 2 3 4 5 6 7
11/26/2016 17:01:29 hxia: csce322hw04pt01.pl
11/26/2016 17:01:34 hxia: csce322hw04pt02.pl
11/26/2016 17:01:40 hxia: csce322hw04pt03.pl
11/26/2016 17:01:46 hxia: helpers.pl – OK
11/26/2016 17:02:13 hxia: csce322hw04pt04.pl
11/26/2016 17:01:29 hxia: csce322hw04pt01.pl
11/26/2016 17:01:34 hxia: csce322hw04pt02.pl
11/26/2016 17:01:40 hxia: csce322hw04pt03.pl
11/26/2016 17:01:46 hxia: helpers.pl – Deleted by User
Chapter 1 Metadata
1.1 Submitted Files
11/26/2016 17:02:13 hxia: csce322hw04pt04.pl
11/27/2016 12:22:06 hxia: csce322hw04pt01.pl
11/27/2016 12:22:10 hxia: csce322hw04pt02.pl
11/27/2016 12:22:18 hxia: csce322hw04pt03.pl
11/27/2016 12:22:24 hxia: csce322hw04pt04.pl
11/27/2016 12:23:57 hxia: helpers.pl – OK
11/27/2016 12:22:06 hxia: csce322hw04pt01.pl
11/27/2016 12:22:10 hxia: csce322hw04pt02.pl
11/27/2016 12:22:18 hxia: csce322hw04pt03.pl
11/27/2016 12:22:24 hxia: csce322hw04pt04.pl
11/27/2016 12:23:57 hxia: helpers.pl – Deleted by User
11/27/2016 23:10:06 hxia: csce322hw04pt01.pl 11/27/2016 23:10:09 hxia: csce322hw04pt02.pl 11/27/2016 23:10:12 hxia: csce322hw04pt03.pl 11/27/2016 23:10:14 hxia: csce322hw04pt04.pl 11/27/2016 23:11:56 hxia: helpers.pl – OK 11/27/2016 23:10:14 hxia: csce322hw04pt04.pl 11/27/2016 23:25:03 hxia: csce322hw04pt04.pl
1.2 webgrader Runs
2016 -11 -26 T17 :02:50 -0600 2016 -11 -26 T17 :03:15 -0600 2016 -11 -27 T12 :22:57 -0600 2016 -11 -27 T12 :24:03 -0600 2016 -11 -27 T23 :10:42 -0600 2016 -11 -27 T23 :12:01 -0600 2016 -11 -27 T23 :25:16 -0600
1.3 diffs
webgrader.time
70.121.227.30 70.121.227.30 70.121.227.30 70.121.227.30 70.121.227.30 70.121.227.30 70.121.227.30
hxia 0004 hxia 0004 hxia 0004 hxia 0004 hxia 0004 hxia 0004 hxia 0004
handin.time
14
– OK – OK – OK
– OK
– Deleted – Deleted – Deleted
by User by User by User
by User
by User by User by User by User
by User
– Deleted – OK
– OK
– OK
– OK
-OK -OK -OK -OK
– Deleted – OK
– Deleted – Deleted – Deleted – Deleted

submission.diffs
15

Chapter 2 webgrader Run
webgrader Report Generated Successfully
16

Chapter 3
csce322hw04pt01.pl
3.1 part01test01 3.1.1 Diff
3.1.2 Input File
[15,8,5,13,6,14,7,16,6]. [3,1,4,3,1,3,2,2,1]. [2,-,3,-].
[3,-,2,-].
[4,-,1,-]. [1,-,4,-]. [1,-1,-1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [1,-1,-1]. [-1,1,1]. [-1,-1,1]. [1,1,-1].
3.1.3 Submission Output
game [2,-,3,-] [3,-,2,-] [4,-,1,-] [1,-,4,-] false
3.1.4 Solution Output
game [2,-,3,-] [3,-,2,-] [4,-,1,-] [1,-,4,-] false
3.1.5 stderr
part01test01.diff
part01test01.gts
part01test01.output
part01test01.output
17

3.2 part01test02 3.2.1 Diff
3.2.2 Input File
[4,13,3,4,9,4,11]. [1,3,2,2,1,3,3]. [1,3,-,-].
[4 ,2 ,1 ,3]. [-,1,-,2]. [-,4,3,1]. [1,-1,-1,-1]. [-1,-1,1,-1]. [-1,1,-1,-1]. [1,-1,1]. [-1,-1,1]. [-1,1,-1]. [1,-1,-1].
3.2.3 Submission Output
game [1,3,-,-] [4,2,1,3] [-,1,-,2] [-,4,3,1] false
3.2.4 Solution Output
game [1,3,-,-] [4,2,1,3] [-,1,-,2] [-,4,3,1] false
3.2.5 stderr
3.3 part01test03 3.3.1 Diff
part01test02.diff
part01test02.gts
3.3.2 Input File
part01test01.err
part01test02.output
part01test02.output
part01test02.err
part01test03.diff
18

[16 ,9 ,15 ,2 ,9 ,14 ,2]. [2,2,3,4,2,1,3]. [2,1,-,4]. [-,4,1,-]. [4,3,2,-]. [1,2,4,-]. [1,1,-1,-1]. [1,-1,1,-1]. [-1,-1,1,1]. [-1,1,1].
[1,-1,1]. [-1,-1,-1]. [1,1,-1].
3.3.3 Submission Output
game [2,1,-,4] [-,4,1,-] [4,3,2,-] [1,2,4,-] false
3.3.4 Solution Output
game [2,1,-,4] [-,4,1,-] [4,3,2,-] [1,2,4,-] false
3.3.5 stderr
3.4 part01test04 3.4.1 Diff
3.4.2 Input File
[5,16,8,10,5,9,6,8,8,1]. [2,2,3,2,3,3,4,4,3,4]. [-,-,-,2].
[4,-,-,1].
[3 ,1 ,2 ,4]. [2,-,1,-]. [1,-1,-1,-1]. [-1,-1,-1,1]. [-1,1,-1,-1]. [1,1,-1]. [-1,1,-1].
part01test03.output
part01test03.output
part01test03.err
part01test04.diff
part01test04.gts
part01test03.gts
19

[-1,1,1]. [1,-1,1].
3.4.3 Submission Output
game [-,-,-,2] [4,-,-,1] [3,1,2,4] [2,-,1,-] false
3.4.4 Solution Output
game [-,-,-,2] [4,-,-,1] [3,1,2,4] [2,-,1,-] false
3.4.5 stderr
3.5 part01test05 3.5.1 Diff
3.5.2 Input File
[12 ,11 ,10 ,6 ,5 ,15 ,6 ,11 ,5]. [3,1,2,3,2,2,2,4,3]. [3,-,2,1].
[2,-,-,4].
[4,3,-,-]. [1,2,-,3]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [1,-1,-1]. [-1,1,1]. [-1,-1,1]. [1,1,-1].
3.5.3 Submission Output
game [3,-,2,1] [2,-,-,4] [4,3,-,-] [1,2,-,3] false
part01test04.output
part01test04.output
part01test04.err
part01test05.diff
part01test05.gts
part01test05.output
20

3.5.4 Solution Output
game [3,-,2,1] [2,-,-,4] [4,3,-,-] [1,2,-,3] false
3.5.5 stderr
3.6 part01test06 3.6.1 Diff
3.6.2 Input File
[16 ,7 ,3 ,6 ,1]. [3,4,2,1,2]. [-,2,1,4]. [4,-,3,2]. [-,-,2,3]. [2,3,4,-]. [1,-1,1,-1]. [-1,1,-1,1]. [1,-1,1,-1]. [-1,-1,1]. [-1,1,-1]. [1,-1,1]. [1,1,-1].
3.6.3 Submission Output
game [-,2,1,4] [4,-,3,2] [-,-,2,3] [2,3,4,-] false
3.6.4 Solution Output
game [-,2,1,4] [4,-,3,2] [-,-,2,3] [2,3,4,-] false
3.6.5 stderr
part01test05.err
part01test06.diff
part01test06.gts
part01test05.output
part01test06.output
part01test06.output
21

3.7 part01test07 3.7.1 Diff
3.7.2 Input File
[14 ,11 ,10 ,14]. [4 ,4 ,3 ,4].
[2 ,1 ,3 ,4]. [4,3,-,-]. [1,2,-,3].
[3 ,4 ,2 ,1]. [1,1,-1,-1]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,1,1]. [-1,-1,1]. [1,1,-1]. [1,-1,-1].
3.7.3 Submission Output
game [2,1,3,4] [4,3,-,-] [1,2,-,3] [3,4,2,1] true
3.7.4 Solution Output
game [2,1,3,4] [4,3,-,-] [1,2,-,3] [3,4,2,1] true
3.7.5 stderr
3.8 part01test08 3.8.1 Diff
part01test07.diff
part01test07.gts
3.8.2 Input File
part01test06.err
part01test07.output
part01test07.output
part01test07.err
part01test08.diff
22

[12,2,6,1,8,10,2,16,6,2,7]. [1,4,3,3,4,3,1,3,4,1,1]. [-,3,2,1].
[-,-,-,4].
[3,-,4,2]. [2,-,-,-]. [-1,-1,1,1]. [1,-1,1,-1]. [-1,1,-1,1]. [-1,-1,-1]. [1 ,1 ,1]. [-1,1,-1]. [1,-1,1].
3.8.3 Submission Output
game [-,3,2,1] [-,-,-,4] [3,-,4,2] [2,-,-,-] false
3.8.4 Solution Output
game [-,3,2,1] [-,-,-,4] [3,-,4,2] [2,-,-,-] false
3.8.5 stderr
3.9 part01test09 3.9.1 Diff
3.9.2 Input File
[14 ,1 ,13 ,13]. [3 ,2 ,4 ,1]. [-,3,1,-]. [1,2,3,-].
[3 ,4 ,2 ,1]. [2 ,1 ,4 ,3]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [-1,-1,1]. [1 ,1 ,1].
part01test08.output
part01test08.output
part01test08.err
part01test09.diff
part01test09.gts
part01test08.gts
23

[1,-1,-1]. [-1,1,-1].
3.9.3 Submission Output
game [-,3,1,-] [1,2,3,-] [3,4,2,1] [2,1,4,3] true
3.9.4 Solution Output
game [-,3,1,-] [1,2,3,-] [3,4,2,1] [2,1,4,3] true
3.9.5 stderr
3.10 part01test10 3.10.1 Diff
3.10.2 Input File
[6,6,1,1,5,13,15,16,12,11]. [1,3,4,2,4,2,3,3,4,4]. [-,-,3,-].
[3,-,2,4].
[1,2,-,-]. [4,3,-,-]. [1,-1,-1,1]. [-1,1,1,-1]. [1,1,-1,-1]. [1,-1,-1]. [-1,1,1]. [1,1,-1]. [-1,-1,1].
3.10.3 Submission Output
game [-,-,3,-] [3,-,2,4] [1,2,-,-] [4,3,-,-] false
part01test09.output
part01test09.output
part01test09.err
part01test10.diff
part01test10.gts
part01test10.output
24

3.10.4 Solution Output
game [-,-,3,-] [3,-,2,4] [1,2,-,-] [4,3,-,-] false
3.10.5 stderr
3.11 part01test11 3.11.1 Diff
3.11.2 Input File
[11 ,7 ,12 ,2 ,9]. [2,1,4,1,4]. [3,2,-,1]. [-,4,2,3]. [4,-,-,2]. [2,3,-,4]. [-1,1,-1,1]. [1,-1,1,-1]. [-1,1,-1,1]. [-1,1,-1]. [1,-1,1]. [-1,1,-1]. [1,-1,1].
3.11.3 Submission Output
game [3,2,-,1] [-,4,2,3] [4,-,-,2] [2,3,-,4] false
3.11.4 Solution Output
game [3,2,-,1] [-,4,2,3] [4,-,-,2] [2,3,-,4] false
3.11.5 stderr
part01test10.err
part01test11.diff
part01test11.gts
part01test10.output
part01test11.output
part01test11.output
25

3.12 part01test12 3.12.1 Diff
3.12.2 Input File
[16 ,9 ,4 ,15 ,4 ,2 ,15 ,10 ,10]. [3,2,1,4,4,4,2,2,4]. [1,3,-,4].
[-,2,-,1].
[2,1,4,-]. [-,4,1,-]. [1,-1,1,-1]. [-1,-1,1,1]. [1,1,-1,-1]. [1,-1,1]. [-1,1,-1]. [-1,1,-1]. [1,-1,1].
3.12.3 Submission Output
game [1,3,-,4] [-,2,-,1] [2,1,4,-] [-,4,1,-] false
3.12.4 Solution Output
game [1,3,-,4] [-,2,-,1] [2,1,4,-] [-,4,1,-] false
3.12.5 stderr
3.13 part01test13 3.13.1 Diff
part01test12.diff
part01test12.gts
3.13.2 Input File
part01test11.err
part01test12.output
part01test12.output
part01test12.err
part01test13.diff
26

[4 ,2 ,11 ,15 ,14 ,2 ,12 ,10 ,9]. [2,2,2,3,3,4,1,3,2]. [2,3,-,4].
[-,1,-,-].
[1,2,-,-]. [-,4,-,1]. [1,-1,1,-1]. [-1,1,1,1]. [1,1,-1,-1]. [1,-1,1]. [-1,1,-1]. [1,1,-1]. [1,-1,-1].
3.13.3 Submission Output
game [2,3,-,4] [-,1,-,-] [1,2,-,-] [-,4,-,1] false
3.13.4 Solution Output
game [2,3,-,4] [-,1,-,-] [1,2,-,-] [-,4,-,1] false
3.13.5 stderr
3.14 part01test14 3.14.1 Diff
3.14.2 Input File
[7,7,2,3,15,6,1,7,14]. [4,3,1,1,2,3,4,3,1]. [-,3,4,1].
[-,-,3,-].
[-,-,2,-]. [4 ,2 ,1 ,3]. [-1,1,-1,1]. [1,-1,-1,1]. [1,1,-1,-1]. [1,1,-1]. [1,-1,-1].
part01test13.output
part01test13.output
part01test13.err
part01test14.diff
part01test14.gts
part01test13.gts
27

[-1,1,1]. [-1,-1,1].
3.14.3 Submission Output
game [-,3,4,1] [-,-,3,-] [-,-,2,-] [4,2,1,3] false
3.14.4 Solution Output
game [-,3,4,1] [-,-,3,-] [-,-,2,-] [4,2,1,3] false
3.14.5 stderr
3.15 part01test15 3.15.1 Diff
3.15.2 Input File
[3 ,15 ,7 ,12]. [4 ,4 ,2 ,4]. [3 ,2 ,1 ,4]. [1 ,4 ,3 ,2]. [-,-,2,-]. [2,3,-,1]. [-1,1,1,-1]. [1,-1,-1,1]. [-1,1,1,-1]. [-1,-1,1]. [1,-1,-1]. [-1,1,1]. [1,1,-1].
3.15.3 Submission Output
game [3,2,1,4] [1,4,3,2] [-,-,2,-] [2,3,-,1] true
part01test14.output
part01test14.output
part01test14.err
part01test15.diff
part01test15.gts
part01test15.output
28

3.15.4 Solution Output
game [3,2,1,4] [1,4,3,2] [-,-,2,-] [2,3,-,1] true
3.15.5 stderr
3.16 part01test16 3.16.1 Diff
3.16.2 Input File
[5,9,4,2,7,15,4,9,15,7]. [3,2,3,2,1,2,1,2,4,4]. [1,-,-,2].
[-,2,3,1].
[3,-,2,-]. [-,4,1,3]. [1,-1,-1,-1]. [-1,-1,-1,1]. [-1,1,-1,-1]. [1,1,-1]. [-1,1,-1]. [-1,1,1]. [1,-1,1].
3.16.3 Submission Output
game [1,-,-,2] [-,2,3,1] [3,-,2,-] [-,4,1,3] false
3.16.4 Solution Output
game [1,-,-,2] [-,2,3,1] [3,-,2,-] [-,4,1,3] false
3.16.5 stderr
part01test15.err
part01test16.diff
part01test16.gts
part01test15.output
part01test16.output
part01test16.output
29

3.17 part01test17 3.17.1 Diff
3.17.2 Input File
[14 ,11 ,2 ,15 ,10 ,16 ,16]. [4,2,1,2,2,4,2].
[1 ,4 ,3 ,2].
[-,2,-,-].
[2,1,-,-]. [4,3,2,-]. [1,-1,-1,1]. [-1,-1,1,-1]. [1,1,-1,-1]. [1,-1,-1]. [-1,-1,1]. [-1,1,-1]. [-1,-1,-1].
3.17.3 Submission Output
game [1,4,3,2] [-,2,-,-] [2,1,-,-] [4,3,2,-] false
3.17.4 Solution Output
game [1,4,3,2] [-,2,-,-] [2,1,-,-] [4,3,2,-] false
3.17.5 stderr
3.18 part01test18 3.18.1 Diff
part01test17.diff
part01test17.gts
3.18.2 Input File
part01test16.err
part01test17.output
part01test17.output
part01test17.err
part01test18.diff
30

[11,2,9,8,1,16,12,6,10]. [3,3,3,2,1,1,1,2,2]. [-,2,-,3].
[-,-,-,1].
[2,1,-,4]. [3,-,-,-]. [1,1,-1,-1]. [-1,-1,1,1]. [1,1,-1,-1]. [1,1,-1]. [-1,-1,-1]. [-1,1,1]. [1,-1,1].
3.18.3 Submission Output
game [-,2,-,3] [-,-,-,1] [2,1,-,4] [3,-,-,-] false
3.18.4 Solution Output
game [-,2,-,3] [-,-,-,1] [2,1,-,4] [3,-,-,-] false
3.18.5 stderr
3.19 part01test19 3.19.1 Diff
3.19.2 Input File
[10 ,6 ,16 ,14 ,6 ,13]. [2,1,4,4,4,1]. [4,1,2,-]. [3,-,-,-].
[2 ,3 ,4 ,1]. [1,4,3,-]. [-1,1,-1,1]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,1,1]. [-1,-1,1].
part01test18.output
part01test18.output
part01test18.err
part01test19.diff
part01test19.gts
part01test18.gts
31

[1,1,-1]. [1,-1,-1].
3.19.3 Submission Output
game [4,1,2,-] [3,-,-,-] [2,3,4,1] [1,4,3,-] false
3.19.4 Solution Output
game [4,1,2,-] [3,-,-,-] [2,3,4,1] [1,4,3,-] false
3.19.5 stderr
3.20 part01test20 3.20.1 Diff
3.20.2 Input File
[15,1,5,14,12,9,1,3,7]. [1,1,1,4,2,4,2,2,4]. [-,-,-,3].
[3,1,2,-].
[-,-,4,-]. [4,2,-,1]. [1,-1,1,1]. [-1,1,1,-1]. [1,-1,-1,-1]. [1,-1,1]. [-1,1,1]. [1,1,-1]. [-1,1,-1].
3.20.3 Submission Output
game [-,-,-,3] [3,1,2,-] [-,-,4,-] [4,2,-,1] false
part01test19.output
part01test19.output
part01test19.err
part01test20.diff
part01test20.gts
part01test20.output
32

3.20.4 Solution Output
game [-,-,-,3] [3,1,2,-] [-,-,4,-] [4,2,-,1] false
3.20.5 stderr
3.21 part01test21 3.21.1 Diff
3.21.2 Input File
[12,5,3,15,3,3,2]. [3,3,4,1,1,3,2]. [3,-,2,1]. [-,2,4,3]. [-,1,3,-]. [2,3,-,4]. [-1,-1,1,1]. [1,-1,-1,-1]. [-1,1,-1,1]. [1,-1,-1]. [1,1,-1]. [-1,1,-1]. [1,-1,1].
3.21.3 Submission Output
game [3,-,2,1] [-,2,4,3] [-,1,3,-] [2,3,-,4] false
3.21.4 Solution Output
game [3,-,2,1] [-,2,4,3] [-,1,3,-] [2,3,-,4] false
3.21.5 stderr
part01test20.err
part01test21.diff
part01test21.gts
part01test20.output
part01test21.output
part01test21.output
33

3.22 part01test22 3.22.1 Diff
3.22.2 Input File
[1 ,13 ,12 ,14 ,4 ,11 ,8 ,3]. [4,2,4,2,3,3,4,3]. [-,2,4,-].
[3,4,2,-].
[-,3,-,2]. [-,-,-,4]. [1,1,-1,-1]. [1,-1,-1,1]. [-1,-1,1,1]. [1,1,-1]. [1,-1,-1]. [-1,-1,1]. [-1,1,1].
3.22.3 Submission Output
game [-,2,4,-] [3,4,2,-] [-,3,-,2] [-,-,-,4] false
3.22.4 Solution Output
game [-,2,4,-] [3,4,2,-] [-,3,-,2] [-,-,-,4] false
3.22.5 stderr
3.23 part01test23 3.23.1 Diff
part01test22.diff
part01test22.gts
3.23.2 Input File
part01test21.err
part01test22.output
part01test22.output
part01test22.err
part01test23.diff
34

[3,5,9,6,2,7,14,10,12]. [3,3,1,1,3,2,2,2,4]. [4,-,-,3].
[-,-,-,-].
[-,-,3,2]. [2,3,-,1]. [-1,1,-1,1]. [-1,1,1,-1]. [1,-1,1,-1]. [-1,1,1]. [-1,-1,1]. [1,-1,-1]. [1,1,-1].
3.23.3 Submission Output
game [4,-,-,3] [-,-,-,-] [-,-,3,2] [2,3,-,1] false
3.23.4 Solution Output
game [4,-,-,3] [-,-,-,-] [-,-,3,2] [2,3,-,1] false
3.23.5 stderr
3.24 part01test24 3.24.1 Diff
3.24.2 Input File
[10 ,3 ,16 ,13 ,5 ,9 ,12 ,3 ,14]. [4,1,1,4,3,2,3,2,3]. [4,-,-,-].
[2,1,-,-].
[-,2,4,1]. [1,4,-,-]. [-1,-1,1,1]. [1,1,1,-1]. [-1,1,-1,1]. [-1,-1,1]. [-1,1,1].
part01test23.output
part01test23.output
part01test23.err
part01test24.diff
part01test24.gts
part01test23.gts
35

[-1,1,-1]. [1,-1,1].
3.24.3 Submission Output
game [4,-,-,-] [2,1,-,-] [-,2,4,1] [1,4,-,-] false
3.24.4 Solution Output
game [4,-,-,-] [2,1,-,-] [-,2,4,1] [1,4,-,-] false
3.24.5 stderr
3.25 part01test25 3.25.1 Diff
3.25.2 Input File
[3,8,8,1,3]. [4,4,2,3,3]. [-,1,2,3]. [3 ,2 ,4 ,1]. [-,3,1,4]. [1,-,3,2]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,1,1,-1]. [-1,1,1]. [-1,1,-1]. [1,-1,1]. [1,-1,-1].
3.25.3 Submission Output
game [-,1,2,3] [3,2,4,1] [-,3,1,4] [1,-,3,2] true
part01test24.output
part01test24.output
part01test24.err
part01test25.diff
part01test25.gts
part01test25.output
36

3.25.4 Solution Output
game [-,1,2,3] [3,2,4,1] [-,3,1,4] [1,-,3,2] true
3.25.5 stderr
3.26 part01test26 3.26.1 Diff
3.26.2 Input File
[11 ,16 ,10 ,7 ,3 ,13 ,16 ,11 ,1 ,2]. [2,1,4,2,2,3,4,3,3,4]. [-,1,3,-].
[-,3,-,2].
[-,-,-,1]. [1,4,2,-]. [1,1,-1,-1]. [-1,-1,1,-1]. [-1,1,-1,1]. [-1,1,1]. [-1,-1,1]. [-1,1,-1]. [1,-1,1].
3.26.3 Submission Output
game [-,1,3,-] [-,3,-,2] [-,-,-,1] [1,4,2,-] false
3.26.4 Solution Output
game [-,1,3,-] [-,3,-,2] [-,-,-,1] [1,4,2,-] false
3.26.5 stderr
part01test25.err
part01test26.diff
part01test26.gts
part01test25.output
part01test26.output
part01test26.output
37

3.27 part01test27 3.27.1 Diff
3.27.2 Input File
[2 ,1 ,16 ,8 ,12 ,15]. [3,3,4,3,1,2]. [-,3,1,4]. [-,4,3,2]. [3,2,4,-]. [4,-,-,-]. [-1,1,1,-1]. [1,-1,1,-1]. [1,-1,-1,1]. [1,-1,1]. [1,-1,-1]. [-1,1,-1]. [-1,1,1].
3.27.3 Submission Output
game [-,3,1,4] [-,4,3,2] [3,2,4,-] [4,-,-,-] false
3.27.4 Solution Output
game [-,3,1,4] [-,4,3,2] [3,2,4,-] [4,-,-,-] false
3.27.5 stderr
3.28 part01test28 3.28.1 Diff
part01test27.diff
part01test27.gts
3.28.2 Input File
part01test26.err
part01test27.output
part01test27.output
part01test27.err
part01test28.diff
38

[12,3,9,4,11,4,12,1,5]. [4,2,3,4,1,2,2,4,1]. [-,-,-,4].
[1 ,4 ,2 ,3].
[-,2,-,1]. [-,1,-,2]. [-1,1,1,-1]. [1,-1,1,-1]. [-1,-1,1,1]. [1,-1,1]. [1,-1,1]. [-1,1,-1]. [-1,1,-1].
3.28.3 Submission Output
game [-,-,-,4] [1,4,2,3] [-,2,-,1] [-,1,-,2] false
3.28.4 Solution Output
game [-,-,-,4] [1,4,2,3] [-,2,-,1] [-,1,-,2] false
3.28.5 stderr
3.29 part01test29 3.29.1 Diff
3.29.2 Input File
[12,2,9,6,1,15,7,3,1,12]. [4,4,2,3,3,2,2,2,4,3]. [-,2,-,4].
[-,-,1,2].
[-,-,2,-]. [2,1,-,3]. [1,1,-1,-1]. [-1,1,1,-1]. [-1,-1,1,1]. [1 ,1 ,1]. [-1,-1,1].
part01test28.output
part01test28.output
part01test28.err
part01test29.diff
part01test29.gts
part01test28.gts
39

[1,-1,-1]. [-1,1,-1].
3.29.3 Submission Output
game [-,2,-,4] [-,-,1,2] [-,-,2,-] [2,1,-,3] false
3.29.4 Solution Output
game [-,2,-,4] [-,-,1,2] [-,-,2,-] [2,1,-,3] false
3.29.5 stderr
3.30 part01test30 3.30.1 Diff
3.30.2 Input File
[1 ,5 ,2 ,14 ,15 ,10 ,16 ,1]. [2,4,2,2,3,2,3,1]. [-,-,4,1].
[-,4,-,-].
[4,1,3,-]. [3,2,1,-]. [-1,1,-1,1]. [1,-1,1,-1]. [-1,1,-1,1]. [1,1,-1]. [1,-1,1]. [-1,1,-1]. [-1,-1,1].
3.30.3 Submission Output
game [-,-,4,1] [-,4,-,-] [4,1,3,-] [3,2,1,-] false
part01test29.output
part01test29.output
part01test29.err
part01test30.diff
part01test30.gts
part01test30.output
40

1 2 3 4 5 6 7 8 9
10
ispace(X, Y, Game):- nth0(X, Game, R), nth0(Y, R, -).
3.30.4 Solution Output
game [-,-,4,1] [-,4,-,-] [4,1,3,-] [3,2,1,-] false
3.30.5 stderr
3.31 Source Code
part01test30.err
csce322hw04pt01.pl
getRowAndCol(Game, NumRow, NumCol):- length(Game, nth0(0, Game, FR), length(FR, NumCol).
getNumSpace(Game, Len):- findall([X, Y], ispace(X,
percentageSpaces(Game):-
getNumSpace(Game, Len), A is Len * 100,
NumRow),
Y, Game), Out), length(Out, Len).
part01test30.output
getRowAndCol(Game, NumRow, NumCol), Total is NumRow * NumCol, B is Total * 25, A =< B. 41 Chapter 4 csce322hw04pt02.pl 4.1 part02test01 4.1.1 Diff 4.1.2 Input File [1 ,10 ,7 ,1 ,13]. [1,3,2,2,3]. [-,3,4,-]. [2,4,-,1]. [3,-,2,4]. [4 ,2 ,1 ,3]. [1,1,-1,-1]. [1,-1,-1,1]. [1,1,-1,-1]. [1,1,-1]. [1,-1,-1]. [-1,1,1]. [-1,-1,1]. 4.1.3 Submission Output game [-,3,4,-] [2,4,-,1] [3,-,2,4] [4,2,1,3] true 4.1.4 Solution Output game [-,3,4,-] [2,4,-,1] [3,-,2,4] [4,2,1,3] true 4.1.5 stderr part02test01.diff part02test01.gts part02test01.output part02test01.output 42 4.2 part02test02 4.2.1 Diff 4.2.2 Input File [14 ,12 ,9 ,13 ,1 ,15]. [2,2,3,2,3,4]. [-,3,-,-]. [4,1,3,-]. [1,4,2,-]. [3,2,-,4]. [1,-1,-1,1]. [-1,1,-1,1]. [1,-1,-1,1]. [1,1,-1]. [-1,1,-1]. [1,-1,1]. [-1,-1,1]. 4.2.3 Submission Output game [-,3,-,-] [4,1,3,-] [1,4,2,-] [3,2,-,4] true 4.2.4 Solution Output game [-,3,-,-] [4,1,3,-] [1,4,2,-] [3,2,-,4] true 4.2.5 stderr 4.3 part02test03 4.3.1 Diff part02test02.diff part02test02.gts 4.3.2 Input File part02test01.err part02test02.output part02test02.output part02test02.err part02test03.diff 43 [15,4,9,4,2,10,4,5,14,2]. [1,3,4,1,2,4,3,1,3,3]. [3,-,-,4]. [-,4,-,-]. [4,2,1,-]. [-,3,4,2]. [-1,1,1,-1]. [1,-1,-1,1]. [-1,1,1,-1]. [-1,1,1]. [1,-1,-1]. [-1,-1,1]. [1,1,-1]. 4.3.3 Submission Output game [3,-,-,4] [-,4,-,-] [4,2,1,-] [-,3,4,2] false 4.3.4 Solution Output game [3,-,-,4] [-,4,-,-] [4,2,1,-] [-,3,4,2] false 4.3.5 stderr 4.4 part02test04 4.4.1 Diff 4.4.2 Input File [3 ,1 ,16 ,14 ,15 ,5]. [3,3,2,2,3,2]. [-,-,3,4]. [4,3,2,-]. [-,2,4,-]. [3,4,1,-]. [1,1,-1,-1]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,1,1]. [-1,-1,-1]. part02test03.output part02test03.output part02test03.err part02test04.diff part02test04.gts part02test03.gts 44 [1,1,-1]. [1,-1,1]. 4.4.3 Submission Output game [-,-,3,4] [4,3,2,-] [-,2,4,-] [3,4,1,-] true 4.4.4 Solution Output game [-,-,3,4] [4,3,2,-] [-,2,4,-] [3,4,1,-] true 4.4.5 stderr 4.5 part02test05 4.5.1 Diff 4.5.2 Input File [10 ,8 ,4 ,1 ,10]. [1,2,1,3,1]. [-,1,2,4]. [4,2,-,1]. [1 ,3 ,4 ,2]. [-,-,1,3]. [1,1,1,-1]. [-1,1,1,1]. [1,1,-1,1]. [-1,1,1]. [-1,1,-1]. [1,1,-1]. [1,-1,1]. 4.5.3 Submission Output game [-,1,2,4] [4,2,-,1] [1,3,4,2] [-,-,1,3] true part02test04.output part02test04.output part02test04.err part02test05.diff part02test05.gts part02test05.output 45 4.5.4 Solution Output game [-,1,2,4] [4,2,-,1] [1,3,4,2] [-,-,1,3] true 4.5.5 stderr 4.6 part02test06 4.6.1 Diff 4.6.2 Input File [7,8,6,1,6,4]. [1,1,3,3,3,1]. [-,3,1,2]. [1,-,3,4]. [2,-,4,3]. [-,-,2,1]. [-1,-1,1,1]. [1,-1,1,-1]. [1,1,-1,-1]. [-1,-1,1]. [1 ,1 ,1]. [-1,1,-1]. [1,-1,-1]. 4.6.3 Submission Output game [-,3,1,2] [1,-,3,4] [2,-,4,3] [-,-,2,1] false 4.6.4 Solution Output game [-,3,1,2] [1,-,3,4] [2,-,4,3] [-,-,2,1] false 4.6.5 stderr part02test05.err part02test06.diff part02test06.gts part02test05.output part02test06.output part02test06.output 46 4.7 part02test07 4.7.1 Diff 4.7.2 Input File [12 ,12 ,3 ,4 ,1]. [3,4,1,1,2]. [-,1,4,2]. [2 ,4 ,1 ,3]. [-,2,3,4]. [-,3,-,1]. [-1,1,-1,1]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,1,-1]. [1,-1,1]. [1 ,1 ,1]. [-1,-1,-1]. 4.7.3 Submission Output game [-,1,4,2] [2,4,1,3] [-,2,3,4] [-,3,-,1] true 4.7.4 Solution Output game [-,1,4,2] [2,4,1,3] [-,2,3,4] [-,3,-,1] true 4.7.5 stderr 4.8 part02test08 4.8.1 Diff part02test07.diff part02test07.gts 4.8.2 Input File part02test06.err part02test07.output part02test07.output part02test07.err part02test08.diff 47 [11,16,10,12,13,7,1,2,15,5,8]. [3,2,2,4,1,1,1,1,3,3,3]. [-,-,1,-]. [-,1,-,3]. [2,-,-,-]. [1,-,-,-]. [1,-1,1,-1]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,-1,1]. [-1,1,1]. [1,1,-1]. [1,-1,-1]. 4.8.3 Submission Output game [-,-,1,-] [-,1,-,3] [2,-,-,-] [1,-,-,-] false 4.8.4 Solution Output game [-,-,1,-] [-,1,-,3] [2,-,-,-] [1,-,-,-] false 4.8.5 stderr 4.9 part02test09 4.9.1 Diff 4.9.2 Input File [16 ,15 ,10 ,11]. [1 ,1 ,1 ,4]. [1 ,3 ,2 ,4]. [4,2,-,1]. [3,4,-,-]. [2,1,4,-]. [1,-1,1,-1]. [-1,1,-1,1]. [-1,-1,1,1]. [1,-1,1]. [-1,1,-1]. part02test08.output part02test08.output part02test08.err part02test09.diff part02test09.gts part02test08.gts 48 [1,-1,1]. [-1,1,-1]. 4.9.3 Submission Output game [1,3,2,4] [4,2,-,1] [3,4,-,-] [2,1,4,-] true 4.9.4 Solution Output game [1,3,2,4] [4,2,-,1] [3,4,-,-] [2,1,4,-] true 4.9.5 stderr 4.10 part02test10 4.10.1 Diff 4.10.2 Input File [15 ,6 ,13 ,12 ,10 ,9 ,2]. [2,3,2,1,4,2,2]. [1,3,-,-]. [-,-,-,1]. [3,1,2,-]. [4,2,-,3]. [1,1,-1,-1]. [1,-1,-1,1]. [1,1,-1,-1]. [1,1,-1]. [1,-1,-1]. [-1,1,1]. [-1,-1,1]. 4.10.3 Submission Output game [1,3,-,-] [-,-,-,1] [3,1,2,-] [4,2,-,3] false part02test09.output part02test09.output part02test09.err part02test10.diff part02test10.gts part02test10.output 49 4.10.4 Solution Output game [1,3,-,-] [-,-,-,1] [3,1,2,-] [4,2,-,3] false 4.10.5 stderr 4.11 part02test11 4.11.1 Diff 4.11.2 Input File [4 ,6 ,10 ,2 ,14]. [1,2,1,1,3]. [2 ,1 ,3 ,4]. [-,-,-,-]. [3 ,2 ,4 ,1]. [-,4,2,3]. [1,1,-1,-1]. [-1,-1,1,-1]. [-1,1,-1,1]. [-1,1,1]. [-1,-1,1]. [-1,1,-1]. [1,-1,1]. 4.11.3 Submission Output game [2,1,3,4] [-,-,-,-] [3,2,4,1] [-,4,2,3] false 4.11.4 Solution Output game [2,1,3,4] [-,-,-,-] [3,2,4,1] [-,4,2,3] false 4.11.5 stderr part02test10.err part02test11.diff part02test11.gts part02test10.output part02test11.output part02test11.output 50 4.12 part02test12 4.12.1 Diff 4.12.2 Input File [10 ,13 ,7 ,10 ,15 ,4 ,12]. [2,1,4,3,3,2,4]. [4,3,2,-]. [1,2,-,4]. [3,-,1,-]. [-,1,-,3]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [-1,-1,-1]. [1 ,1 ,1]. [1,-1,1]. [-1,1,-1]. 4.12.3 Submission Output game [4,3,2,-] [1,2,-,4] [3,-,1,-] [-,1,-,3] true 4.12.4 Solution Output game [4,3,2,-] [1,2,-,4] [3,-,1,-] [-,1,-,3] true 4.12.5 stderr 4.13 part02test13 4.13.1 Diff part02test12.diff part02test12.gts 4.13.2 Input File part02test11.err part02test12.output part02test12.output part02test12.err part02test13.diff 51 [3,1,12,6,10,3,8]. [3,4,1,4,1,2,3]. [-,3,2,4]. [4,-,-,1]. [-,4,1,3]. [3,-,-,2]. [1,-1,1,-1]. [-1,1,-1,1]. [1,-1,1,-1]. [1,-1,1]. [-1,1,-1]. [1,-1,1]. [-1,1,-1]. 4.13.3 Submission Output game [-,3,2,4] [4,-,-,1] [-,4,1,3] [3,-,-,2] true 4.13.4 Solution Output game [-,3,2,4] [4,-,-,1] [-,4,1,3] [3,-,-,2] true 4.13.5 stderr 4.14 part02test14 4.14.1 Diff 4.14.2 Input File [13 ,12 ,2 ,8]. [4 ,1 ,1 ,1]. [2,4,3,-]. [-,3,4,2]. [3 ,2 ,1 ,4]. [4,-,-,3]. [-1,-1,1,1]. [1,-1,-1,1]. [1,-1,1,-1]. [1,-1,-1]. [1,1,-1]. part02test13.output part02test13.output part02test13.err part02test14.diff part02test14.gts part02test13.gts 52 [-1,-1,1]. [-1,1,1]. 4.14.3 Submission Output game [2,4,3,-] [-,3,4,2] [3,2,1,4] [4,-,-,3] true 4.14.4 Solution Output game [2,4,3,-] [-,3,4,2] [3,2,1,4] [4,-,-,3] true 4.14.5 stderr 4.15 part02test15 4.15.1 Diff 4.15.2 Input File [13,13,4,11,6,3,5,4,4]. [4,3,2,4,3,2,1,2,2]. [1,-,2,-]. [3,-,1,4]. [-,1,-,2]. [-,3,4,1]. [1,-1,-1,1]. [1,-1,1,-1]. [-1,1,1,-1]. [1,-1,1]. [-1,-1,1]. [-1,1,-1]. [1,1,-1]. 4.15.3 Submission Output game [1,-,2,-] [3,-,1,4] [-,1,-,2] [-,3,4,1] true part02test14.output part02test14.output part02test14.err part02test15.diff part02test15.gts part02test15.output 53 4.15.4 Solution Output game [1,-,2,-] [3,-,1,4] [-,1,-,2] [-,3,4,1] true 4.15.5 stderr 4.16 part02test16 4.16.1 Diff 4.16.2 Input File [12,7,9,4,1,8,2,8,10]. [3,1,1,3,3,3,4,4,2]. [-,3,-,4]. [-,4,-,2]. [3,-,4,1]. [-,-,-,3]. [-1,1,1,-1]. [1,-1,1,-1]. [1,-1,-1,1]. [1,-1,1]. [1,-1,-1]. [-1,1,-1]. [-1,1,1]. 4.16.3 Submission Output game [-,3,-,4] [-,4,-,2] [3,-,4,1] [-,-,-,3] true 4.16.4 Solution Output game [-,3,-,4] [-,4,-,2] [3,-,4,1] [-,-,-,3] true 4.16.5 stderr part02test15.err part02test16.diff part02test16.gts part02test15.output part02test16.output part02test16.output 54 4.17 part02test17 4.17.1 Diff 4.17.2 Input File [15 ,7 ,14 ,10 ,16]. [1,4,4,3,3]. [2 ,4 ,3 ,1]. [1,3,-,-]. [4,-,1,-]. [3,1,2,-]. [-1,-1,1,1]. [1,-1,-1,1]. [-1,-1,1,1]. [1,-1,-1]. [1,1,-1]. [-1,-1,1]. [-1,1,1]. 4.17.3 Submission Output game [2,4,3,1] [1,3,-,-] [4,-,1,-] [3,1,2,-] false 4.17.4 Solution Output game [2,4,3,1] [1,3,-,-] [4,-,1,-] [3,1,2,-] false 4.17.5 stderr 4.18 part02test18 4.18.1 Diff part02test17.diff part02test17.gts 4.18.2 Input File part02test16.err part02test17.output part02test17.output part02test17.err part02test18.diff 55 [13 ,16 ,16 ,14]. [4 ,2 ,3 ,2]. [2,1,4,-]. [4,3,2,-]. [1 ,4 ,3 ,2]. [3,2,1,-]. [1,1,-1,-1]. [-1,1,1,1]. [1,-1,-1,1]. [-1,1,-1]. [-1,-1,-1]. [1,-1,-1]. [-1,-1,1]. 4.18.3 Submission Output game [2,1,4,-] [4,3,2,-] [1,4,3,2] [3,2,1,-] false 4.18.4 Solution Output game [2,1,4,-] [4,3,2,-] [1,4,3,2] [3,2,1,-] false 4.18.5 stderr 4.19 part02test19 4.19.1 Diff 4.19.2 Input File [14 ,2 ,8 ,1 ,15 ,5]. [3,3,1,4,3,4]. [-,-,4,2]. [-,2,3,-]. [2,4,1,-]. [3,-,2,4]. [1,-1,-1,-1]. [-1,1,-1,1]. [1,-1,1,1]. [1,1,-1]. [-1,1,-1]. part02test18.output part02test18.output part02test18.err part02test19.diff part02test19.gts part02test18.gts 56 [1,-1,1]. [-1,1,1]. 4.19.3 Submission Output game [-,-,4,2] [-,2,3,-] [2,4,1,-] [3,-,2,4] true 4.19.4 Solution Output game [-,-,4,2] [-,2,3,-] [2,4,1,-] [3,-,2,4] true 4.19.5 stderr 4.20 part02test20 4.20.1 Diff 4.20.2 Input File [7 ,6 ,14 ,7 ,11 ,12 ,6]. [2,4,2,4,1,3,2]. [3 ,1 ,2 ,4]. [2,-,1,-]. [4,-,-,1]. [1,3,-,2]. [-1,1,-1,-1]. [1,-1,1,-1]. [-1,1,1,1]. [-1,1,1]. [1,-1,1]. [-1,1,-1]. [1,1,-1]. 4.20.3 Submission Output game [3,1,2,4] [2,-,1,-] [4,-,-,1] [1,3,-,2] false part02test19.output part02test19.output part02test19.err part02test20.diff part02test20.gts part02test20.output 57 4.20.4 Solution Output game [3,1,2,4] [2,-,1,-] [4,-,-,1] [1,3,-,2] false 4.20.5 stderr 4.21 part02test21 4.21.1 Diff 4.21.2 Input File [10,7,9,15,1,6,9,1,14,3,5]. [2,1,3,4,2,2,1,4,1,3,2]. [-,-,-,2]. [1,-,-,-]. [-,-,4,-]. [4 ,3 ,2 ,1]. [-1,-1,1,1]. [1,-1,1,-1]. [1,1,-1,-1]. [1,-1,1]. [1 ,1 ,1]. [-1,1,-1]. [-1,-1,-1]. 4.21.3 Submission Output game [-,-,-,2] [1,-,-,-] [-,-,4,-] [4,3,2,1] false 4.21.4 Solution Output game [-,-,-,2] [1,-,-,-] [-,-,4,-] [4,3,2,1] false 4.21.5 stderr part02test20.err part02test21.diff part02test21.gts part02test20.output part02test21.output part02test21.output 58 4.22 part02test22 4.22.1 Diff 4.22.2 Input File [15 ,12 ,11 ,15 ,14]. [3,3,3,3,2]. [2 ,4 ,3 ,1]. [1,3,4,-]. [4,1,-,-]. [3,2,-,4]. [-1,-1,1,1]. [1,-1,-1,1]. [-1,1,-1,1]. [1,-1,-1]. [1,1,-1]. [-1,1,1]. [-1,-1,1]. 4.22.3 Submission Output game [2,4,3,1] [1,3,4,-] [4,1,-,-] [3,2,-,4] true 4.22.4 Solution Output game [2,4,3,1] [1,3,4,-] [4,1,-,-] [3,2,-,4] true 4.22.5 stderr 4.23 part02test23 4.23.1 Diff part02test22.diff part02test22.gts 4.23.2 Input File part02test21.err part02test22.output part02test22.output part02test22.err part02test23.diff 59 [10,7,9,10,6,3,14,6,3,14]. [2,2,2,3,4,4,3,2,4,2]. [2,4,-,3]. [3,-,-,-]. [-,-,3,1]. [1 ,3 ,4 ,2]. [1,-1,1,1]. [1,1,1,-1]. [-1,1,1,1]. [1,-1,1]. [-1,1,1]. [-1,1,-1]. [1,1,-1]. 4.23.3 Submission Output game [2,4,-,3] [3,-,-,-] [-,-,3,1] [1,3,4,2] true 4.23.4 Solution Output game [2,4,-,3] [3,-,-,-] [-,-,3,1] [1,3,4,2] true 4.23.5 stderr 4.24 part02test24 4.24.1 Diff 4.24.2 Input File [8,5,15,8,7,6,8,3,6,16]. [3,4,3,1,2,2,4,2,1,1]. [3,-,4,2]. [2,-,3,1]. [-,-,2,-]. [4,-,1,-]. [-1,1,-1,-1]. [-1,-1,-1,1]. [1,-1,-1,-1]. [-1,1,-1]. [1,-1,-1]. part02test23.output part02test23.output part02test23.err part02test24.diff part02test24.gts part02test23.gts 60 [1,-1,1]. [-1,-1,1]. 4.24.3 Submission Output game [3,-,4,2] [2,-,3,1] [-,-,2,-] [4,-,1,-] false 4.24.4 Solution Output game [3,-,4,2] [2,-,3,1] [-,-,2,-] [4,-,1,-] false 4.24.5 stderr 4.25 part02test25 4.25.1 Diff 4.25.2 Input File [4,8,16,2,16,2,7]. [4,4,3,4,2,1,2]. [3 ,2 ,4 ,1]. [-,1,3,2]. [2,-,1,3]. [-,-,2,-]. [1,-1,-1,1]. [-1,1,-1,1]. [-1,-1,1,1]. [-1,1,-1]. [-1,1,-1]. [1,-1,1]. [1,-1,1]. 4.25.3 Submission Output game [3,2,4,1] [-,1,3,2] [2,-,1,3] [-,-,2,-] false part02test24.output part02test24.output part02test24.err part02test25.diff part02test25.gts part02test25.output 61 4.25.4 Solution Output game [3,2,4,1] [-,1,3,2] [2,-,1,3] [-,-,2,-] false 4.25.5 stderr 4.26 part02test26 4.26.1 Diff 4.26.2 Input File [16 ,11 ,4 ,13 ,5 ,1 ,12 ,6 ,15]. [2,3,2,1,1,2,2,2,2]. [-,-,3,-]. [3,-,4,1]. [1,3,-,-]. [-,4,-,-]. [-1,1,1,-1]. [-1,1,-1,1]. [1,1,-1,-1]. [-1,1,-1]. [-1,1,-1]. [1,-1,1]. [1,-1,1]. 4.26.3 Submission Output game [-,-,3,-] [3,-,4,1] [1,3,-,-] [-,4,-,-] false 4.26.4 Solution Output game [-,-,3,-] [3,-,4,1] [1,3,-,-] [-,4,-,-] false 4.26.5 stderr part02test25.err part02test26.diff part02test26.gts part02test25.output part02test26.output part02test26.output 62 4.27 part02test27 4.27.1 Diff 4.27.2 Input File [16 ,12 ,16 ,4 ,10 ,6 ,10 ,1]. [2,4,3,2,3,1,4,4]. [-,4,3,2]. [3,-,-,4]. [4 ,3 ,2 ,1]. [-,1,-,-]. [1,-1,-1,1]. [1,1,1,-1]. [-1,-1,1,1]. [1,-1,-1]. [-1,-1,1]. [-1,-1,-1]. [-1,1,-1]. 4.27.3 Submission Output game [-,4,3,2] [3,-,-,4] [4,3,2,1] [-,1,-,-] true 4.27.4 Solution Output game [-,4,3,2] [3,-,-,4] [4,3,2,1] [-,1,-,-] true 4.27.5 stderr 4.28 part02test28 4.28.1 Diff part02test27.diff part02test27.gts 4.28.2 Input File part02test26.err part02test27.output part02test27.output part02test27.err part02test28.diff 63 [7 ,2 ,1 ,14 ,9 ,15 ,16]. [2,2,1,3,2,4,3]. [-,1,-,3]. [-,3,4,-]. [3,-,1,-]. [1,2,3,-]. [-1,1,1,-1]. [1,1,-1,1]. [-1,-1,1,1]. [-1,1,1]. [1,1,-1]. [1,-1,1]. [1 ,1 ,1]. 4.28.3 Submission Output game [-,1,-,3] [-,3,4,-] [3,-,1,-] [1,2,3,-] false 4.28.4 Solution Output game [-,1,-,3] [-,3,4,-] [3,-,1,-] [1,2,3,-] false 4.28.5 stderr 4.29 part02test29 4.29.1 Diff 4.29.2 Input File [3 ,15 ,5 ,8]. [4 ,2 ,3 ,2]. [2,-,3,1]. [1 ,3 ,4 ,2]. [-,2,1,-]. [3,-,2,4]. [-1,-1,1,1]. [1,-1,-1,1]. [-1,-1,1,1]. [1,-1,-1]. [1,1,-1]. part02test28.output part02test28.output part02test28.err part02test29.diff part02test29.gts part02test28.gts 64 [-1,-1,1]. [-1,1,1]. 4.29.3 Submission Output game [2,-,3,1] [1,3,4,2] [-,2,1,-] [3,-,2,4] true 4.29.4 Solution Output game [2,-,3,1] [1,3,4,2] [-,2,1,-] [3,-,2,4] true 4.29.5 stderr 4.30 part02test30 4.30.1 Diff 4.30.2 Input File [16 ,16 ,3 ,14 ,10 ,8 ,16 ,16 ,12 ,2 ,16]. [4,4,4,1,4,2,3,4,1,2,4]. [2 ,4 ,1 ,3]. [-,3,-,-]. [-,2,4,1]. [4,-,-,-]. [-1,-1,1,1]. [1,-1,1,-1]. [1,-1,-1,1]. [1,-1,1]. [1,-1,1]. [-1,1,-1]. [-1,1,-1]. 4.30.3 Submission Output game [2,4,1,3] [-,3,-,-] [-,2,4,1] [4,-,-,-] false part02test29.output part02test29.output part02test29.err part02test30.diff part02test30.gts part02test30.output 65 4.30.4 Solution Output game [2,4,1,3] [-,3,-,-] [-,2,4,1] [4,-,-,-] false 4.30.5 stderr 4.31 Source Code part02test30.err csce322hw04pt02.pl 1 ispace(X, Y, Game):- nth0(X, Game, R), nth0(Y, R, -). 2 3 getRowAndCol(Game, NumRow, NumCol):- length(Game, 4 nth0(0, Game, FR), length(FR, NumCol). 5 6 getNumSpace(Game, Len):- findall([X, Y], ispace(X, 7 8 9 columnsAndSpaces(Game):- 10 getNumSpace(Game, Len), 11 12 getRowAndCol(Game, _, NumCol), 13 14 A is Len mod 2, 15 16 B is NumCol mod 2, 17 18 A == B. NumRow), Y, Game), Out), length(Out, Len). part02test30.output 66 Chapter 5 csce322hw04pt03.pl 5.1 part03test01 5.1.1 Diff 5.1.2 Input File [16,5,11,3,12,3,8,7]. [2,3,4,3,2,1,3,4]. [3,-,2,1]. [2 ,1 ,3 ,4]. [-,-,-,3]. [1,-,-,-]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,1,1,-1]. [1,-1,-1]. [-1,1,1]. [-1,-1,1]. [1,1,-1]. 5.1.3 Submission Output game [3,-,2,1] [2,1,3,4] [-,-,-,3] [1,-,-,-] sequence 3-4 5-4 7-2 8-3 11 -1 12 -4 16 -2 true 5.1.4 Solution Output part03test01.diff part03test01.gts part03test01.output 67 game [3,-,2,1] [2,1,3,4] [-,-,-,3] [1,-,-,-] sequence 3-4 5-4 7-2 8-3 11 -1 12 -4 16 -2 true 5.1.5 stderr part03test01.output part03test01.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.2 part03test02 5.2.1 Diff 5.2.2 Input File [6 ,3]. [2 ,3]. [2 ,4 ,3 ,1]. [3,-,4,2]. [-,2,1,3]. [1 ,3 ,2 ,4]. [1,-1,1,1]. [1,1,-1,1]. [-1,1,1,1]. [1,-1,-1]. [-1,1,-1]. [-1,-1,1]. [1,-1,1]. 5.2.3 Submission Output game [2,4,3,1] [3,-,4,2] [-,2,1,3] [1,3,2,4] sequence 3-4 part03test02.diff part03test02.gts part03test02.output 68 6-1 true 5.2.4 Solution Output game [2,4,3,1] [3,-,4,2] [-,2,1,3] [1,3,2,4] sequence 3-4 6-1 true 5.2.5 stderr part03test02.output 5.3 part03test03 5.3.1 Diff 5.3.2 Input File [3,2,3,4,3,14,9]. [3,1,1,4,2,4,2]. [4,3,-,1]. [-,1,4,-]. [-,2,3,4]. [-,4,1,2]. [-1,-1,1,1]. [-1,1,-1,1]. [1,1,-1,-1]. [-1,-1,-1]. [-1,1,-1]. [1 ,1 ,1]. [1,-1,1]. 5.3.3 Submission Output game [4,3,-,1] [-,1,4,-] [-,2,3,4] [-,4,1,2] sequence 2-2 part03test03.diff part03test03.gts part03test02.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test03.output 69 3-1 4-3 9-2 14 -3 true 5.3.4 Solution Output game [4,3,-,1] [-,1,4,-] [-,2,3,4] [-,4,1,2] sequence 2-2 3-1 4-3 9-2 14 -3 true 5.3.5 stderr part03test03.output 5.4 part03test04 5.4.1 Diff 5.4.2 Input File [6 ,3]. [3 ,2]. [1 ,2 ,4 ,3]. [4,-,1,2]. [-,1,3,4]. [3 ,4 ,2 ,1]. [1,1,-1,-1]. [-1,-1,1,1]. [1,1,-1,-1]. [1,1,-1]. [-1,-1,1]. [-1,1,1]. [1,-1,-1]. 5.4.3 Submission Output part03test04.diff part03test04.gts game part03test03.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test04.output 70 [1,2,4,3] [4,-,1,2] [-,1,3,4] [3,4,2,1] sequence 3-2 6-3 true 5.4.4 Solution Output game [1,2,4,3] [4,-,1,2] [-,1,3,4] [3,4,2,1] sequence 3-2 6-3 true 5.4.5 stderr part03test04.output 5.5 part03test05 5.5.1 Diff 5.5.2 Input File [12 ,3]. [1 ,4]. [1 ,4 ,3 ,2]. [3 ,2 ,1 ,4]. [-,1,4,3]. [4,3,-,1]. [1,-1,-1,1]. [-1,-1,1,-1]. [1,1,-1,-1]. [1,-1,-1]. [-1,-1,1]. [-1,1,-1]. [-1,-1,-1]. 5.5.3 Submission Output part03test05.diff part03test05.gts game part03test04.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test05.output 71 [1,4,3,2] [3,2,1,4] [-,1,4,3] [4,3,-,1] sequence 3-2 12 -2 true 5.5.4 Solution Output game [1,4,3,2] [3,2,1,4] [-,1,4,3] [4,3,-,1] sequence 3-2 12 -2 true 5.5.5 stderr part03test05.output 5.6 part03test06 5.6.1 Diff 5.6.2 Input File [12 ,16 ,13]. [1 ,4 ,1]. [4,3,2,-]. [1 ,2 ,3 ,4]. [3 ,4 ,1 ,2]. [2,1,-,-]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [-1,-1,-1]. [1 ,1 ,1]. [1,-1,1]. [-1,1,-1]. 5.6.3 Submission Output part03test06.diff part03test06.gts game part03test05.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test06.output 72 [4,3,2,-] [1,2,3,4] [3,4,1,2] [2,1,-,-] sequence 12 -4 13 -1 16 -3 true 5.6.4 Solution Output game [4,3,2,-] [1,2,3,4] [3,4,1,2] [2,1,-,-] sequence 12 -4 13 -1 16 -3 true 5.6.5 stderr part03test06.output part03test06.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.7 part03test07 5.7.1 Diff 5.7.2 Input File [6 ,1 ,9 ,11 ,12 ,1]. [3,3,3,3,1,2]. [-,1,-,3]. [4,-,2,1]. [3,2,-,4]. [1,4,-,2]. [1,1,-1,-1]. [-1,-1,-1,1]. [-1,1,1,-1]. [-1,1,-1]. [-1,-1,-1]. [-1,-1,1]. [1,-1,-1]. 5.7.3 Submission Output part03test07.diff part03test07.gts 73 game [-,1,-,3] [4,-,2,1] [3,2,-,4] [1,4,-,2] sequence 1-2 6-3 9-4 11 -1 12 -3 true 5.7.4 Solution Output game [-,1,-,3] [4,-,2,1] [3,2,-,4] [1,4,-,2] sequence 1-2 6-3 9-4 11 -1 12 -3 true 5.7.5 stderr part03test07.output part03test07.output part03test07.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.8 part03test08 5.8.1 Diff 5.8.2 Input File [12 ,15 ,12 ,12]. [1 ,1 ,3 ,2]. [2 ,4 ,3 ,1]. [3 ,1 ,2 ,4]. [4,2,1,-]. [1,3,-,2]. [1,-1,-1,1]. [1,1,-1,-1]. [-1,1,1,-1]. [1,-1,-1]. part03test08.diff part03test08.gts 74 [-1,1,1]. [-1,-1,1]. [1,1,-1]. 5.8.3 Submission Output game [2,4,3,1] [3,1,2,4] [4,2,1,-] [1,3,-,2] sequence 12 -4 15 -3 true 5.8.4 Solution Output game [2,4,3,1] [3,1,2,4] [4,2,1,-] [1,3,-,2] sequence 12 -4 15 -3 true 5.8.5 stderr part03test08.output part03test08.output part03test08.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.9 part03test09 5.9.1 Diff 5.9.2 Input File [4 ,3 ,10 ,2 ,10 ,16 ,1]. [2,4,4,4,3,3,4]. [-,2,1,4]. [-,1,-,3]. [-,4,3,1]. [-,3,4,-]. [1,-1,1,-1]. [-1,1,1,-1]. [-1,-1,1,1]. [-1,-1,1]. part03test09.diff part03test09.gts 75 [-1,1,1]. [1,-1,-1]. [1,1,-1]. 5.9.3 Submission Output game [-,2,1,4] [-,1,-,3] [-,4,3,1] [-,3,4,-] sequence 1-3 2-4 3-2 4-1 10 -2 16 -2 true 5.9.4 Solution Output game [-,2,1,4] [-,1,-,3] [-,4,3,1] [-,3,4,-] sequence 1-3 2-4 3-2 4-1 10 -2 16 -2 true 5.9.5 stderr part03test09.output part03test09.output part03test09.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.10 part03test10 5.10.1 Diff 5.10.2 Input File [16 ,1 ,13 ,11 ,1 ,15 ,1 ,15]. [2,4,4,1,4,3,4,4]. part03test10.diff part03test10.gts 76 [-,3,1,-]. [1 ,2 ,3 ,4]. [2,1,-,-]. [3,4,2,-]. [-1,-1,1,1]. [1,-1,1,-1]. [1,1,-1,-1]. [-1,-1,1]. [1 ,1 ,1]. [-1,1,-1]. [1,-1,-1]. 5.10.3 Submission Output game [-,3,1,-] [1,2,3,4] [2,1,-,-] [3,4,2,-] sequence 1-4 11 -4 13 -2 15 -3 16 -1 true 5.10.4 Solution Output game [-,3,1,-] [1,2,3,4] [2,1,-,-] [3,4,2,-] sequence 1-4 11 -4 13 -2 15 -3 16 -1 true 5.10.5 stderr part03test10.output part03test10.output part03test10.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.11 part03test11 5.11.1 Diff part03test11.diff 77 5.11.2 Input File [2 ,15 ,12 ,2 ,3 ,11 ,7 ,13]. [1,4,3,4,1,1,3,4]. [2,1,4,-]. [-,4,2,1]. [-,-,-,-]. [1,2,-,4]. [1,1,-1,-1]. [1,-1,-1,1]. [-1,-1,1,1]. [-1,1,-1]. [1,-1,-1]. [-1,-1,1]. [1 ,1 ,1]. 5.11.3 Submission Output game [2,1,4,-] [-,4,2,1] [-,-,-,-] [1,2,-,4] sequence 2-3 3-4 7-3 11 -1 12 -3 13 -3 15 -2 true 5.11.4 Solution Output game [2,1,4,-] [-,4,2,1] [-,-,-,-] [1,2,-,4] sequence 2-3 3-4 7-3 11 -1 12 -3 13 -3 15 -2 true 5.11.5 stderr part03test11.output part03test11.gts part03test11.output part03test11.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: 78 Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.12 part03test12 5.12.1 Diff 5.12.2 Input File [3]. [1]. [4 ,2 ,3 ,1]. [3 ,1 ,4 ,2]. [-,4,1,3]. [1 ,3 ,2 ,4]. [-1,-1,1,1]. [-1,1,-1,1]. [-1,-1,1,1]. [-1,1,-1]. [-1,1,-1]. [1,-1,1]. [1,-1,1]. 5.12.3 Submission Output game [4,2,3,1] [3,1,4,2] [-,4,1,3] [1,3,2,4] sequence 3-2 true 5.12.4 Solution Output game [4,2,3,1] [3,1,4,2] [-,4,1,3] [1,3,2,4] sequence 3-2 true 5.12.5 stderr part03test12.diff part03test12.gts part03test12.output part03test12.output part03test12.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 79 5.13 part03test13 5.13.1 Diff 5.13.2 Input File [6,8,9,5,6,10]. [1,3,4,4,3,1]. [1,-,-,3]. [4,-,-,2]. [2 ,4 ,3 ,1]. [3,-,2,4]. [1,1,-1,-1]. [-1,1,1,-1]. [1,-1,-1,1]. [1,1,-1]. [-1,-1,1]. [1,-1,-1]. [-1,1,1]. 5.13.3 Submission Output game [1,-,-,3] [4,-,-,2] [2,4,3,1] [3,-,2,4] sequence 5-2 6-3 8-1 9-4 10 -1 true 5.13.4 Solution Output game [1,-,-,3] [4,-,-,2] [2,4,3,1] [3,-,2,4] sequence 5-2 6-3 8-1 9-4 10 -1 true 5.13.5 stderr part03test13.diff part03test13.gts part03test13.output part03test13.output part03test13.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: 80 Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.14 part03test14 5.14.1 Diff 5.14.2 Input File [2 ,13 ,2 ,12 ,14]. [2,4,3,4,2]. [2,3,4,-]. [-,1,2,-]. [3 ,2 ,1 ,4]. [1,4,-,2]. [1,-1,-1,1]. [-1,1,-1,1]. [-1,1,1,-1]. [1,1,-1]. [-1,1,1]. [-1,-1,1]. [1,-1,-1]. 5.14.3 Submission Output game [2,3,4,-] [-,1,2,-] [3,2,1,4] [1,4,-,2] sequence 2-4 12 -3 13 -1 14 -3 true 5.14.4 Solution Output game [2,3,4,-] [-,1,2,-] [3,2,1,4] [1,4,-,2] sequence 2-4 12 -3 13 -1 14 -3 true 5.14.5 stderr part03test14.diff part03test14.gts part03test14.output part03test14.output 81 part03test14.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.15 part03test15 5.15.1 Diff 5.15.2 Input File [7]. [1]. [4 ,1 ,2 ,3]. [3 ,2 ,4 ,1]. [2,-,1,4]. [1 ,4 ,3 ,2]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,1,1,-1]. [-1,1,1]. [-1,1,-1]. [1,-1,1]. [1,-1,-1]. 5.15.3 Submission Output game [4,1,2,3] [3,2,4,1] [2,-,1,4] [1,4,3,2] sequence 7-3 true 5.15.4 Solution Output game [4,1,2,3] [3,2,4,1] [2,-,1,4] [1,4,3,2] sequence 7-3 true 5.15.5 stderr part03test15.diff part03test15.gts part03test15.output part03test15.output part03test15.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: 82 Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.16 part03test16 5.16.1 Diff 5.16.2 Input File [9 ,4]. [4 ,2]. [4,1,-,3]. [2 ,3 ,4 ,1]. [1 ,2 ,3 ,4]. [-,4,1,2]. [-1,1,1,-1]. [-1,-1,-1,1]. [1,1,-1,-1]. [-1,1,1]. [1,1,-1]. [1 ,1 ,1]. [1,-1,1]. 5.16.3 Submission Output game [4,1,-,3] [2,3,4,1] [1,2,3,4] [-,4,1,2] sequence 4-3 9-2 true 5.16.4 Solution Output game [4,1,-,3] [2,3,4,1] [1,2,3,4] [-,4,1,2] sequence 4-3 9-2 true 5.16.5 stderr part03test16.diff part03test16.gts part03test16.output part03test16.output part03test16.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: 83 Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.17 part03test17 5.17.1 Diff 5.17.2 Input File [9 ,16 ,14 ,5 ,4 ,5]. [3,2,4,1,4,3]. [2,-,-,1]. [3,1,2,-]. [4 ,2 ,1 ,3]. [-,3,4,-]. [1,-1,-1,1]. [1,1,-1,-1]. [-1,1,1,-1]. [1,-1,-1]. [-1,1,1]. [-1,-1,1]. [1,1,-1]. 5.17.3 Submission Output game [2,-,-,1] [3,1,2,-] [4,2,1,3] [-,3,4,-] sequence 4-1 5-4 9-3 14 -4 16 -2 true 5.17.4 Solution Output game [2,-,-,1] [3,1,2,-] [4,2,1,3] [-,3,4,-] sequence 4-1 5-4 9-3 14 -4 16 -2 true part03test17.diff part03test17.gts part03test17.output part03test17.output 84 5.17.5 stderr part03test17.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.18 part03test18 5.18.1 Diff 5.18.2 Input File [4]. [1]. [3 ,2 ,1 ,4]. [4 ,1 ,2 ,3]. [2 ,3 ,4 ,1]. [-,4,3,2]. [1,-1,1,-1]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,-1,1]. [-1,1,1]. [1,1,-1]. [1,-1,-1]. 5.18.3 Submission Output game [3,2,1,4] [4,1,2,3] [2,3,4,1] [-,4,3,2] sequence 4-1 true 5.18.4 Solution Output game [3,2,1,4] [4,1,2,3] [2,3,4,1] [-,4,3,2] sequence 4-1 true 5.18.5 stderr part03test18.diff part03test18.gts part03test18.output part03test18.output 85 part03test18.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.19 part03test19 5.19.1 Diff 5.19.2 Input File [1 ,3 ,1 ,3]. [3 ,4 ,3 ,1]. [-,1,2,3]. [2 ,3 ,4 ,1]. [-,2,1,4]. [1 ,4 ,3 ,2]. [-1,1,1,-1]. [1,-1,-1,1]. [-1,1,1,-1]. [-1,1,1]. [1,1,-1]. [-1,-1,1]. [1,-1,-1]. 5.19.3 Submission Output game [-,1,2,3] [2,3,4,1] [-,2,1,4] [1,4,3,2] sequence 1-4 3-3 true 5.19.4 Solution Output game [-,1,2,3] [2,3,4,1] [-,2,1,4] [1,4,3,2] sequence 1-4 3-3 true 5.19.5 stderr part03test19.diff part03test19.gts part03test19.output part03test19.output 86 part03test19.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.20 part03test20 5.20.1 Diff 5.20.2 Input File [12 ,10 ,8 ,7 ,2 ,12 ,11 ,9]. [1,2,3,4,4,3,3,3]. [2,1,-,4]. [-,4,-,2]. [1,-,-,3]. [4,-,-,1]. [1,1,-1,-1]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,1,1]. [1,-1,1]. [1,1,-1]. [-1,-1,-1]. 5.20.3 Submission Output game [2,1,-,4] [-,4,-,2] [1,-,-,3] [4,-,-,1] sequence 2-3 7-2 8-3 9-3 10 -1 11 -4 12 -2 true 5.20.4 Solution Output game [2,1,-,4] [-,4,-,2] [1,-,-,3] [4,-,-,1] sequence 2-3 part03test20.diff part03test20.gts part03test20.output part03test20.output 87 7-2 8-3 9-3 10 -1 11 -4 12 -2 true 5.20.5 stderr 5.21 part03test21 5.21.1 Diff 5.21.2 Input File [9 ,13 ,5 ,14]. [3 ,4 ,4 ,2]. [4,-,-,-]. [2,1,3,-]. [3 ,4 ,2 ,1]. [1 ,2 ,4 ,3]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [-1,-1,1]. [-1,1,1]. [1,-1,-1]. [1,1,-1]. 5.21.3 Submission Output game [4,-,-,-] [2,1,3,-] [3,4,2,1] [1,2,4,3] sequence 5-3 9-1 13 -2 14 -4 true 5.21.4 Solution Output part03test21.diff part03test21.gts part03test20.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test21.output 88 game [4,-,-,-] [2,1,3,-] [3,4,2,1] [1,2,4,3] sequence 5-3 9-1 13 -2 14 -4 true 5.21.5 stderr part03test21.output part03test21.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.22 part03test22 5.22.1 Diff 5.22.2 Input File [11 ,10 ,6]. [1 ,3 ,4]. [2 ,3 ,1 ,4]. [4,-,-,2]. [3,2,-,1]. [1 ,4 ,2 ,3]. [1,-1,1,-1]. [-1,1,1,-1]. [-1,1,-1,1]. [1,-1,1]. [-1,1,-1]. [-1,1,-1]. [1,-1,1]. 5.22.3 Submission Output game [2,3,1,4] [4,-,-,2] [3,2,-,1] [1,4,2,3] sequence 6-1 10 -3 11 -4 true part03test22.diff part03test22.gts part03test22.output 89 5.22.4 Solution Output game [2,3,1,4] [4,-,-,2] [3,2,-,1] [1,4,2,3] sequence 6-1 10 -3 11 -4 true 5.22.5 stderr part03test22.output part03test22.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.23 part03test23 5.23.1 Diff 5.23.2 Input File [2 ,8 ,5 ,10 ,9]. [4,1,2,3,1]. [4,-,-,2]. [-,2,-,4]. [1 ,4 ,2 ,3]. [2,-,4,1]. [-1,1,-1,1]. [-1,1,1,-1]. [1,-1,1,-1]. [-1,1,-1]. [-1,-1,1]. [1,-1,1]. [1,1,-1]. 5.23.3 Submission Output game [4,-,-,2] [-,2,-,4] [1,4,2,3] [2,-,4,1] sequence 2-3 5-1 8-3 part03test23.diff part03test23.gts part03test23.output 90 9-3 10 -1 true 5.23.4 Solution Output game [4,-,-,2] [-,2,-,4] [1,4,2,3] [2,-,4,1] sequence 2-3 5-1 8-3 9-3 10 -1 true 5.23.5 stderr part03test23.output 5.24 part03test24 5.24.1 Diff 5.24.2 Input File [8 ,12 ,14 ,16]. [4 ,3 ,2 ,4]. [4 ,3 ,2 ,1]. [2,1,4,-]. [1 ,4 ,3 ,2]. [3,-,-,-]. [-1,-1,1,1]. [-1,1,-1,-1]. [1,-1,-1,1]. [-1,-1,-1]. [-1,1,-1]. [1,-1,-1]. [-1,-1,1]. 5.24.3 Submission Output game [4,3,2,1] [2,1,4,-] part03test24.diff part03test24.gts part03test23.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test24.output 91 [1,4,3,2] [3,-,-,-] sequence 8-2 12 -1 14 -3 16 -4 true 5.24.4 Solution Output game [4,3,2,1] [2,1,4,-] [1,4,3,2] [3,-,-,-] sequence 8-2 12 -1 14 -3 16 -4 true 5.24.5 stderr part03test24.output part03test24.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.25 part03test25 5.25.1 Diff 5.25.2 Input File [16 ,13 ,9 ,6 ,15 ,15 ,13]. [1,3,4,1,3,2,4]. [2,3,-,-]. [1,-,3,2]. [3,1,2,-]. [4,2,1,-]. [-1,1,-1,1]. [1,-1,-1,1]. [1,1,-1,-1]. [1,1,-1]. [1,-1,-1]. [-1,1,1]. [-1,-1,1]. 5.25.3 Submission Output part03test25.diff part03test25.gts 92 game [2,3,-,-] [1,-,3,2] [3,1,2,-] [4,2,1,-] sequence 6-4 9-4 13 -1 15 -4 16 -3 true 5.25.4 Solution Output game [2,3,-,-] [1,-,3,2] [3,1,2,-] [4,2,1,-] sequence 6-4 9-4 13 -1 15 -4 16 -3 true 5.25.5 stderr part03test25.output part03test25.output part03test25.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.26 part03test26 5.26.1 Diff 5.26.2 Input File [13 ,8 ,2 ,3 ,8 ,11 ,14]. [3,1,3,1,2,2,4]. [1,3,2,-]. [-,2,1,-]. [-,4,-,1]. [3,-,4,2]. [1,-1,-1,-1]. [-1,1,1,-1]. [1,-1,1,1]. [1,-1,1]. part03test26.diff part03test26.gts 93 [-1,-1,1]. [1,-1,-1]. [-1,1,-1]. 5.26.3 Submission Output game [1,3,2,-] [-,2,1,-] [-,4,-,1] [3,-,4,2] sequence 2-4 3-2 8-1 11 -3 13 -4 14 -3 true 5.26.4 Solution Output game [1,3,2,-] [-,2,1,-] [-,4,-,1] [3,-,4,2] sequence 2-4 3-2 8-1 11 -3 13 -4 14 -3 true 5.26.5 stderr part03test26.output part03test26.output part03test26.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.27 part03test27 5.27.1 Diff 5.27.2 Input File [10 ,6 ,11 ,5 ,15 ,13 ,7]. [4,1,2,2,1,1,4]. part03test27.diff part03test27.gts 94 [3,-,2,-]. [2,-,-,3]. [4,-,-,-]. [1 ,2 ,3 ,4]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [1,-1,-1]. [-1,1,-1]. [-1,-1,1]. [1 ,1 ,1]. 5.27.3 Submission Output game [3,-,2,-] [2,-,-,3] [4,-,-,-] [1,2,3,4] sequence 5-4 6-1 7-3 10 -4 11 -1 13 -1 15 -2 true 5.27.4 Solution Output game [3,-,2,-] [2,-,-,3] [4,-,-,-] [1,2,3,4] sequence 5-4 6-1 7-3 10 -4 11 -1 13 -1 15 -2 true 5.27.5 stderr part03test27.output part03test27.output part03test27.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 95 5.28 part03test28 5.28.1 Diff 5.28.2 Input File [10 ,7 ,3 ,3 ,8 ,10 ,14]. [3,3,1,1,4,3,1]. [2 ,4 ,1 ,3]. [1,3,-,-]. [-,-,3,2]. [3,-,4,1]. [-1,-1,1,1]. [1,-1,1,-1]. [-1,1,1,-1]. [1,-1,1]. [1,-1,1]. [-1,1,-1]. [-1,1,-1]. 5.28.3 Submission Output game [2,4,1,3] [1,3,-,-] [-,-,3,2] [3,-,4,1] sequence 3-4 7-1 8-2 10 -2 14 -4 true 5.28.4 Solution Output game [2,4,1,3] [1,3,-,-] [-,-,3,2] [3,-,4,1] sequence 3-4 7-1 8-2 10 -2 14 -4 true 5.28.5 stderr part03test28.diff part03test28.gts part03test28.output part03test28.output part03test28.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: 96 Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.29 part03test29 5.29.1 Diff 5.29.2 Input File [13 ,2 ,8 ,8 ,2 ,10]. [2,1,1,3,2,2]. [3,2,4,-]. [-,4,-,3]. [2 ,3 ,1 ,4]. [4,-,3,2]. [-1,1,-1,1]. [1,-1,-1,1]. [1,-1,1,-1]. [-1,1,-1]. [1,-1,1]. [1,-1,1]. [-1,1,-1]. 5.29.3 Submission Output game [3,2,4,-] [-,4,-,3] [2,3,1,4] [4,-,3,2] sequence 2-1 8-1 10 -2 13 -1 true 5.29.4 Solution Output game [3,2,4,-] [-,4,-,3] [2,3,1,4] [4,-,3,2] sequence 2-1 8-1 10 -2 13 -1 true 5.29.5 stderr part03test29.diff part03test29.gts part03test29.output part03test29.output 97 part03test29.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.30 part03test30 5.30.1 Diff 5.30.2 Input File [16 ,7 ,1]. [2 ,3 ,4]. [-,1,3,2]. [3 ,2 ,1 ,4]. [2,-,4,1]. [1,4,2,-]. [-1,1,-1,1]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,1,-1]. [-1,-1,1]. [1,1,-1]. [1,-1,1]. 5.30.3 Submission Output game [-,1,3,2] [3,2,1,4] [2,-,4,1] [1,4,2,-] sequence 1-4 7-3 16 -3 true 5.30.4 Solution Output game [-,1,3,2] [3,2,1,4] [2,-,4,1] [1,4,2,-] sequence 1-4 7-3 16 -3 true part03test30.diff part03test30.gts part03test30.output part03test30.output 98 5.30.5 stderr part03test30.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.31 part03test31 5.31.1 Diff 5.31.2 Input File [10 ,10 ,12 ,16 ,10 ,12 ,2 ,4]. [3,2,1,4,3,4,4,3]. [4 ,1 ,3 ,2]. [-,2,-,1]. [2 ,3 ,1 ,4]. [-,4,-,-]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,1,1,-1]. [-1,1,-1]. [-1,1,-1]. [1,-1,1]. [1,-1,1]. 5.31.3 Submission Output game [4,1,3,2] [-,2,-,1] [2,3,1,4] [-,4,-,-] sequence 2-3 4-1 10 -4 12 -2 16 -3 true 5.31.4 Solution Output game [4,1,3,2] [-,2,-,1] [2,3,1,4] [-,4,-,-] sequence 2-3 part03test31.diff part03test31.gts part03test31.output part03test31.output 99 4-1 10 -4 12 -2 16 -3 true 5.31.5 stderr game part03test31.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.32 part03test32 5.32.1 Diff 5.32.2 Input File [9 ,15 ,16 ,8 ,3]. [1,4,2,1,2]. [1,2,-,3]. [3 ,4 ,2 ,1]. [-,3,1,-]. [4,-,3,-]. [1,1,-1,-1]. [-1,-1,-1,1]. [1,-1,1,-1]. [1,1,-1]. [1,-1,-1]. [1,-1,1]. [-1,1,-1]. 5.32.3 Submission Output game [1,2,-,3] [3,4,2,1] [-,3,1,-] [4,-,3,-] sequence 3-2 8-1 9-4 15 -4 16 -2 true 5.32.4 Solution Output part03test32.diff part03test32.gts part03test32.output part03test32.output 100 [1,2,-,3] [3,4,2,1] [-,3,1,-] [4,-,3,-] sequence 3-2 8-1 9-4 15 -4 16 -2 true 5.32.5 stderr 5.33 part03test33 5.33.1 Diff 5.33.2 Input File [1 ,9 ,7]. [4 ,1 ,1]. [-,2,-,4]. [1 ,4 ,3 ,2]. [4,-,2,3]. [2 ,3 ,4 ,1]. [-1,1,1,-1]. [1,-1,-1,1]. [-1,1,1,-1]. [-1,-1,1]. [1,-1,-1]. [-1,1,1]. [1,1,-1]. 5.33.3 Submission Output game [-,2,-,4] [1,4,3,2] [4,-,2,3] [2,3,4,1] sequence 1-3 7-1 9-1 true part03test33.diff part03test33.gts part03test32.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test33.output 101 5.33.4 Solution Output game [-,2,-,4] [1,4,3,2] [4,-,2,3] [2,3,4,1] sequence 1-3 7-1 9-1 true 5.33.5 stderr part03test33.output part03test33.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.34 part03test34 5.34.1 Diff 5.34.2 Input File [14]. [3]. [2 ,3 ,1 ,4]. [4,1,3,-]. [3 ,4 ,2 ,1]. [1 ,2 ,4 ,3]. [1,-1,1,-1]. [-1,1,-1,-1]. [-1,-1,1,1]. [1,-1,1]. [-1,1,-1]. [1,-1,-1]. [1,1,-1]. 5.34.3 Submission Output game [2,3,1,4] [4,1,3,-] [3,4,2,1] [1,2,4,3] sequence 14 -2 true part03test34.diff part03test34.gts part03test34.output 102 5.34.4 Solution Output game [2,3,1,4] [4,1,3,-] [3,4,2,1] [1,2,4,3] sequence 14 -2 true 5.34.5 stderr part03test34.output part03test34.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.35 part03test35 5.35.1 Diff 5.35.2 Input File [16 ,5 ,5]. [2 ,1 ,4]. [2,-,3,1]. [1 ,3 ,4 ,2]. [4 ,2 ,1 ,3]. [3,1,2,-]. [-1,-1,1,1]. [1,-1,-1,1]. [-1,-1,1,1]. [1,-1,-1]. [1,1,-1]. [-1,-1,1]. [-1,1,1]. 5.35.3 Submission Output game [2,-,3,1] [1,3,4,2] [4,2,1,3] [3,1,2,-] sequence 5-4 16 -4 true 5.35.4 Solution Output part03test35.diff part03test35.gts part03test35.output 103 game [2,-,3,1] [1,3,4,2] [4,2,1,3] [3,1,2,-] sequence 5-4 16 -4 true 5.35.5 stderr part03test35.output part03test35.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.36 part03test36 5.36.1 Diff 5.36.2 Input File [10 ,2]. [2 ,3]. [4 ,1 ,2 ,3]. [-,2,-,4]. [2 ,3 ,4 ,1]. [1 ,4 ,3 ,2]. [-1,1,-1,1]. [-1,1,1,-1]. [-1,1,-1,1]. [-1,1,1]. [-1,-1,1]. [1,1,-1]. [1,-1,-1]. 5.36.3 Submission Output game [4,1,2,3] [-,2,-,4] [2,3,4,1] [1,4,3,2] sequence 2-3 10 -1 true 5.36.4 Solution Output part03test36.diff part03test36.gts part03test36.output 104 game [4,1,2,3] [-,2,-,4] [2,3,4,1] [1,4,3,2] sequence 2-3 10 -1 true 5.36.5 stderr part03test36.output part03test36.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.37 part03test37 5.37.1 Diff 5.37.2 Input File [3 ,6 ,15]. [1 ,4 ,4]. [3 ,4 ,1 ,2]. [1,-,4,3]. [-,3,2,-]. [2 ,1 ,3 ,4]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [1,-1,1]. [1,1,-1]. [-1,-1,-1]. [-1,1,1]. 5.37.3 Submission Output game [3,4,1,2] [1,-,4,3] [-,3,2,-] [2,1,3,4] sequence 3-4 6-2 15 -1 true 5.37.4 Solution Output part03test37.diff part03test37.gts part03test37.output 105 game [3,4,1,2] [1,-,4,3] [-,3,2,-] [2,1,3,4] sequence 3-4 6-2 15 -1 true 5.37.5 stderr part03test37.output part03test37.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.38 part03test38 5.38.1 Diff 5.38.2 Input File [2 ,13 ,1 ,10 ,11 ,15]. [2,4,1,2,2,2]. [-,3,2,-]. [-,2,-,4]. [3,1,-,-]. [2 ,4 ,1 ,3]. [-1,-1,1,1]. [1,-1,1,-1]. [-1,1,-1,1]. [-1,-1,-1]. [1 ,1 ,1]. [-1,1,-1]. [1,-1,1]. 5.38.3 Submission Output game [-,3,2,-] [-,2,-,4] [3,1,-,-] [2,4,1,3] sequence 1-4 2-1 10 -3 11 -4 13 -1 part03test38.diff part03test38.gts part03test38.output 106 15 -2 true 5.38.4 Solution Output game [-,3,2,-] [-,2,-,4] [3,1,-,-] [2,4,1,3] sequence 1-4 2-1 10 -3 11 -4 13 -1 15 -2 true 5.38.5 stderr part03test38.output 5.39 part03test39 5.39.1 Diff 5.39.2 Input File [14 ,7 ,15 ,2 ,14 ,3]. [4,4,3,2,3,3]. [4 ,3 ,1 ,2]. [-,2,4,-]. [-,-,2,-]. [2 ,1 ,3 ,4]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [-1,-1,1]. [1,1,-1]. [1,-1,-1]. [-1,1,1]. 5.39.3 Submission Output game [4,3,1,2] [-,2,4,-] part03test39.diff part03test39.gts part03test38.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] part03test39.output 107 [-,-,2,-] [2,1,3,4] sequence 2-1 3-3 7-4 14 -3 15 -1 true 5.39.4 Solution Output game [4,3,1,2] [-,2,4,-] [-,-,2,-] [2,1,3,4] sequence 2-1 3-3 7-4 14 -3 15 -1 true 5.39.5 stderr part03test39.output part03test39.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.40 part03test40 5.40.1 Diff 5.40.2 Input File [12 ,6 ,10 ,16 ,7 ,13 ,15]. [4,2,2,2,1,2,3]. [4,3,2,-]. [1,-,-,4]. [2,-,1,-]. [3,1,-,-]. [-1,-1,1,1]. [1,1,-1,-1]. [1,-1,1,-1]. [-1,-1,-1]. [1 ,1 ,1]. [1,-1,1]. [-1,1,-1]. part03test40.diff part03test40.gts 108 10 5.40.3 Submission Output game [4,3,2,-] [1,-,-,4] [2,-,1,-] [3,1,-,-] sequence 6-2 7-4 10 -3 12 -4 13 -1 15 -3 16 -2 true 5.40.4 Solution Output game [4,3,2,-] [1,-,-,4] [2,-,1,-] [3,1,-,-] sequence 6-2 7-4 10 -3 12 -4 13 -1 15 -3 16 -2 true 5.40.5 stderr part03test40.output part03test40.output part03test40.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:14: Singleton variables: [X] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:89: Singleton variables: [NumCol] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/03/csce322hw04pt03.pl:102: Singleton variables: [Game,Vertical,Horizontal] 5.41 Source Code csce322hw04pt03.pl 1 2 3 ispace(X, Y, Game):- nth0(X, Game, R), nth0(Y, R, -). 4 5 getSpace(Game, Out):- findall([Y, X], ispace(X, Y, Game), Out2), sort(Out2, Out). 6 7 getRowAndCol(Game, NumRow, NumCol):- length(Game, NumRow), 8 nth0(0, Game, FR), length(FR, NumCol). 9 109 11 12 hasEle(Game, X, Y, E):- nth0(X, Game, R), nth0(Y, R, E). 13 14 getColumn(Game, Y, Col):- findall(E, hasEle(Game, X, Y, E), Col). 15 16 changeElement(Game, X, Y, E, NG):- 17 nth0(X, Game, R), changeElementOfOneDimentionList(Y, E, R, NR), 18 19 changeElementOfOneDimentionList(X, NR, Game, NG). 20 21 getElement(Game, X, Y, E):- nth0(X, Game, R), nth0(Y, R, E). 22 23 24 invalid(1, A, B):- A >= B.
25
26 invalid(-1, A, B):- A =< B. 27 28 invalidHo(Game, Vertical, X, 29 T is X - 1, 30 getElement(Vertical , T, Y, 31 32 getElement(Game, T, Y, A), 33 34 A \= -, 35 36 invalid(VE1, A, E). 37 38 invalidHo(Game, Vertical, X, Y, E):- 39 T is X + 1, 40 getElement(Vertical , X, Y, 41 getElement(Game, T, Y, B), 42 B \= -, 43 invalid(VE1, E, B). 44 45 46 invalidV(Game, Vertical, X, Y, E):- 47 T is Y - 1, 48 getElement(Vertical , X, T, 49 getElement(Game, X, T, A), 50 A \= -, 51 invalid(VE1, A, E). 52 53 invalidV(Game, Vertical, X, 54 T is Y + 1, 55 getElement(Vertical , X, Y, 56 getElement(Game, X, T, B), 57 B \= -, 58 invalid(VE1, E, B). 59 60 61 62 63 64 65 writeOne(Game, Vertical, Horizontal, X, Y, E):- 66 between(1, 9, E), 67 68 nth0(X, Game , Row), 69 70 Y, E):- VE1), VE1), VE1), Y, E):- VE1), 110 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 %% %% %% getColumn(Game, Y, Col), \+member(E, Row), \+member(E, Col), \+invalidHo(Game, Vertical, X, Y, E), \+invalidV(Game, Horizontal, X, Y, E). changeOne(Game, Vertical, Horizontal, X, Y, NG):- writeOne(Game, Vertical, Horizontal, X, Y, E), changeElement(Game, X, Y, E, NG). getV(Game , X, Y, E, Fn):- getRowAndCol(Game, NumRow, NumCol), L is NumRow * Y + X + 1, atom_concat(L, -, T), atom_concat(T, E, F), atom_to_term(F, Fn, []). changeAll(Game, Vertical, Horizontal, [], Seq, Seq):- !. changeAll(Game, Vertical, Horizontal, [[Y, X] | T], Seq, Fn):- writeOne(Game, Vertical, Horizontal, X, Y, E), changeElement(Game, X, Y, E, NG), getV(Game , X, Y, E, F), changeAll(NG, Vertical , Horizontal , T, [F|Seq], Fn). changeAll(Game, Vertical, Horizontal, Fn):- getSpace(Game, Space), changeAll(Game, Vertical, Horizontal, Space, [], Fn), !. solveGame(Game,Horizontal,Vertical,SpacesAndValues):- changeAll(Game, Vertical, Horizontal, T), reverse(T, SpacesAndValues). mytest(X, Y, E, NG):- changeElement([[3, 2, 1, -], [-, 4, -, -], [-, 1, -, -], [-, -, -, 1]], X, Y, E, NG). 111 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 mytest2(X, Y, E):- invalidHo([[3, 2, 1, -], [-, 4, -, -], [-, 1, -, -], [-, -, -, 1]], [[-1, 1, 1, -1], [1, -1, -1, 1], [-1, 1, 1, -1]], X, Y, E). %% mytest3(Fn):- changeAll() mytest3(X, Y, E):- readGreaterThanSudokuFile('part01test01.gts',_,_,Game,Vertical,Horizontal), writeOne(Game, Vertical, Horizontal, X, Y, E). appendList([],L,L). appendList([X|L1],L2,[X|L3]) :- appendList(L1,L2,L3). tailList(0,L,L2):- L=L2. tailList(Ith,[_|W],L2) :- K is Ith-1, tailList(K,W,L2). headList(Ith,L,L2) :- tailList(Ith,L,L3), appendList(L2,L3,L). changeElementOfOneDimentionList(Ith,Element,L1,L2) :- K is Ith+1, headList(Ith,L1,L3), appendList(L3,[Element],L4), tailList(K,L1,L5), appendList(L4,L5,L2). 112 Chapter 6 csce322hw04pt04.pl 6.1 part04test01 6.1.1 Diff 6.1.2 Input File [2]. [1]. [1 ,3 ,4 ,2]. [3 ,2 ,3 ,1]. [2 ,4 ,1 ,3]. [3 ,1 ,2 ,4]. [1,-1,-1,-1]. [-1,1,-1,1]. [1,-1,1,1]. [1,1,-1]. [-1,1,-1]. [1,-1,1]. [-1,1,1]. 6.1.3 Submission Output game [1,3,4,2] [3,2,3,1] [2,4,1,3] [3,1,2,4] false 6.1.4 Solution Output game [1,3,4,2] [3,2,3,1] [2,4,1,3] [3,1,2,4] false 6.1.5 stderr part04test01.diff part04test01.gts part04test01.output part04test01.output 113 part04test01.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.2 part04test02 6.2.1 Diff 6.2.2 Input File [2]. [2]. [1 ,3 ,4 ,2]. [3 ,4 ,1 ,3]. [4 ,2 ,3 ,1]. [3 ,1 ,2 ,4]. [1,1,-1,1]. [1,-1,1,-1]. [-1,-1,-1,1]. [1,1,-1]. [1,-1,1]. [-1,1,-1]. [-1,1,1]. 6.2.3 Submission Output game [1,3,4,2] [3,4,1,3] [4,2,3,1] [3,1,2,4] false 6.2.4 Solution Output game [1,3,4,2] [3,4,1,3] [4,2,3,1] [3,1,2,4] false 6.2.5 stderr part04test02.diff part04test02.gts part04test02.output part04test02.output part04test02.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: 114 Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.3 part04test03 6.3.1 Diff 6.3.2 Input File [1]. [1]. [4 ,4 ,3 ,1]. [1 ,3 ,2 ,4]. [3 ,1 ,4 ,2]. [4 ,2 ,1 ,3]. [-1,-1,-1,1]. [1,-1,1,-1]. [1,1,-1,1]. [1,-1,-1]. [1,-1,1]. [-1,1,-1]. [-1,-1,1]. 6.3.3 Submission Output game [4,4,3,1] [1,3,2,4] [3,1,4,2] [4,2,1,3] false 6.3.4 Solution Output game [4,4,3,1] [1,3,2,4] [3,1,4,2] [4,2,1,3] false 6.3.5 stderr part04test03.diff part04test03.gts part04test03.output part04test03.output part04test03.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 115 6.4 part04test04 6.4.1 Diff 6.4.2 Input File [2]. [4]. [4 ,1 ,3 ,2]. [1 ,3 ,1 ,4]. [3 ,2 ,4 ,1]. [1 ,4 ,2 ,3]. [-1,1,-1,1]. [1,-1,1,-1]. [-1,1,-1,1]. [-1,1,-1]. [1,-1,1]. [-1,1,-1]. [1,-1,1]. 6.4.3 Submission Output game [4,1,3,2] [1,3,1,4] [3,2,4,1] [1,4,2,3] false 6.4.4 Solution Output game [4,1,3,2] [1,3,1,4] [3,2,4,1] [1,4,2,3] false 6.4.5 stderr part04test04.diff part04test04.gts part04test04.output part04test04.output part04test04.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.5 part04test05 6.5.1 Diff 116 6.5.2 Input File [1]. [2]. [2 ,2 ,3 ,4]. [4 ,3 ,2 ,1]. [2 ,1 ,4 ,3]. [3 ,4 ,1 ,2]. [1,1,-1,-1]. [-1,-1,1,1]. [1,1,-1,-1]. [1 ,1 ,1]. [-1,-1,-1]. [-1,1,-1]. [1,-1,1]. 6.5.3 Submission Output game [2,2,3,4] [4,3,2,1] [2,1,4,3] [3,4,1,2] false 6.5.4 Solution Output game [2,2,3,4] [4,3,2,1] [2,1,4,3] [3,4,1,2] false 6.5.5 stderr part04test05.output part04test05.output part04test05.err part04test05.diff part04test05.gts Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.6 part04test06 6.6.1 Diff 6.6.2 Input File part04test06.diff 117 [2]. [2]. [1 ,4 ,2 ,3]. [3 ,3 ,4 ,1]. [3 ,2 ,1 ,4]. [4 ,1 ,3 ,2]. [1,-1,1,-1]. [1,-1,-1,1]. [1,-1,1,-1]. [1,-1,1]. [1,1,-1]. [-1,-1,1]. [-1,1,-1]. 6.6.3 Submission Output game [1,4,2,3] [3,3,4,1] [3,2,1,4] [4,1,3,2] false 6.6.4 Solution Output game [1,4,2,3] [3,3,4,1] [3,2,1,4] [4,1,3,2] false 6.6.5 stderr part04test06.output part04test06.output part04test06.err part04test06.gts Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.7 part04test07 6.7.1 Diff 6.7.2 Input File [2]. [2]. [4 ,3 ,1 ,2]. part04test07.diff part04test07.gts 118 [4 ,2 ,3 ,4]. [3 ,4 ,2 ,1]. [2 ,1 ,4 ,3]. [-1,-1,1,1]. [1,1,-1,-1]. [-1,-1,1,1]. [-1,-1,1]. [1 ,1 ,1]. [1,-1,-1]. [-1,1,-1]. 6.7.3 Submission Output game [4,3,1,2] [4,2,3,4] [3,4,2,1] [2,1,4,3] false 6.7.4 Solution Output game [4,3,1,2] [4,2,3,4] [3,4,2,1] [2,1,4,3] false 6.7.5 stderr part04test07.output part04test07.output part04test07.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.8 part04test08 6.8.1 Diff 6.8.2 Input File [1]. [4]. [4 ,2 ,4 ,1]. [4 ,1 ,2 ,3]. [1 ,4 ,3 ,2]. [2 ,3 ,1 ,4]. [1,-1,-1,1]. part04test08.diff part04test08.gts 119 [-1,1,1,-1]. [1,-1,-1,1]. [-1,1,-1]. [-1,1,1]. [1,-1,-1]. [1,-1,1]. 6.8.3 Submission Output game [4,2,4,1] [4,1,2,3] [1,4,3,2] [2,3,1,4] false 6.8.4 Solution Output game [4,2,4,1] [4,1,2,3] [1,4,3,2] [2,3,1,4] false 6.8.5 stderr part04test08.output part04test08.output part04test08.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.9 part04test09 6.9.1 Diff 6.9.2 Input File [2]. [3]. [2 ,3 ,1 ,4]. [2 ,1 ,3 ,2]. [1 ,4 ,2 ,3]. [3 ,2 ,4 ,1]. [1,-1,1,-1]. [-1,1,-1,1]. [1,-1,1,-1]. [1,-1,1]. [-1,1,-1]. [1,-1,1]. [-1,1,-1]. part04test09.diff part04test09.gts 120 6.9.3 Submission Output game [2,3,1,4] [2,1,3,2] [1,4,2,3] [3,2,4,1] false 6.9.4 Solution Output game [2,3,1,4] [2,1,3,2] [1,4,2,3] [3,2,4,1] false 6.9.5 stderr part04test09.output part04test09.err part04test09.output Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.10 part04test10 6.10.1 Diff 6.10.2 Input File [1]. [2]. [4 ,3 ,2 ,1]. [1 ,2 ,3 ,4]. [2 ,4 ,1 ,3]. [3 ,1 ,4 ,2]. [-1,-1,1,1]. [1,1,-1,-1]. [1,-1,1,-1]. [-1,-1,-1]. [1 ,1 ,1]. [1,-1,1]. [-1,1,-1]. 6.10.3 Submission Output part04test10.diff part04test10.gts 121 game [4,3,2,1] [1,2,3,4] [2,4,1,3] [3,1,4,2] true 6.10.4 Solution Output game [4,3,2,1] [1,2,3,4] [2,4,1,3] [3,1,4,2] true 6.10.5 stderr part04test10.output part04test10.err 6.11 part04test11 6.11.1 Diff 6.11.2 Input File [2]. [3]. [3 ,2 ,4 ,1]. [4 ,1 ,2 ,3]. [1 ,4 ,3 ,2]. [2 ,3 ,1 ,4]. [1,-1,-1,1]. [-1,1,1,-1]. [1,-1,-1,1]. [-1,1,-1]. [-1,1,1]. [1,-1,-1]. [1,-1,1]. 6.11.3 Submission Output game [3,2,4,1] [4,1,2,3] part04test11.diff part04test11.gts part04test10.output Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] part04test11.output 122 [1,4,3,2] [2,3,1,4] true 6.11.4 Solution Output game [3,2,4,1] [4,1,2,3] [1,4,3,2] [2,3,1,4] true 6.11.5 stderr part04test11.output part04test11.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.12 part04test12 6.12.1 Diff 6.12.2 Input File [2]. [1]. [2 ,1 ,4 ,3]. [4 ,4 ,1 ,2]. [4 ,3 ,2 ,1]. [1 ,2 ,3 ,4]. [1,1,-1,-1]. [1,-1,1,-1]. [-1,-1,1,1]. [-1,1,-1]. [1,-1,1]. [-1,-1,-1]. [1 ,1 ,1]. 6.12.3 Submission Output game [2,1,4,3] [4,4,1,2] [4,3,2,1] [1,2,3,4] false part04test12.diff part04test12.gts part04test12.output 123 6.12.4 Solution Output game [2,1,4,3] [4,4,1,2] [4,3,2,1] [1,2,3,4] false 6.12.5 stderr part04test12.output part04test12.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.13 part04test13 6.13.1 Diff 6.13.2 Input File [2]. [2]. [1 ,2 ,4 ,3]. [1 ,4 ,2 ,1]. [4 ,3 ,1 ,2]. [2 ,1 ,3 ,4]. [1,1,-1,-1]. [1,-1,-1,1]. [-1,-1,1,1]. [1,1,-1]. [1,-1,-1]. [-1,-1,1]. [-1,1,1]. 6.13.3 Submission Output game [1,2,4,3] [1,4,2,1] [4,3,1,2] [2,1,3,4] false 6.13.4 Solution Output part04test13.diff part04test13.gts part04test13.output 124 game [1,2,4,3] [1,4,2,1] [4,3,1,2] [2,1,3,4] false 6.13.5 stderr part04test13.output part04test13.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] 6.14 part04test14 6.14.1 Diff 6.14.2 Input File [2]. [3]. [1 ,3 ,2 ,4]. [1 ,2 ,1 ,3]. [2 ,4 ,3 ,1]. [3 ,1 ,4 ,2]. [1,-1,-1,-1]. [-1,1,1,-1]. [1,-1,1,1]. [1,-1,1]. [-1,-1,1]. [1,-1,-1]. [-1,1,-1]. 6.14.3 Submission Output game [1,3,2,4] [1,2,1,3] [2,4,3,1] [3,1,4,2] false 6.14.4 Solution Output game [1,3,2,4] [1,2,1,3] part04test14.diff part04test14.gts part04test14.output part04test14.output 125 [2,4,3,1] [3,1,4,2] false 6.14.5 stderr 6.15 part04test15 6.15.1 Diff 6.15.2 Input File [1]. [3]. [3 ,3 ,1 ,4]. [4 ,1 ,3 ,2]. [1 ,4 ,2 ,3]. [3 ,2 ,4 ,1]. [1,-1,1,-1]. [-1,1,-1,1]. [1,-1,1,-1]. [1,-1,1]. [-1,1,-1]. [1,-1,1]. [-1,1,-1]. 6.15.3 Submission Output game [3,3,1,4] [4,1,3,2] [1,4,2,3] [3,2,4,1] false 6.15.4 Solution Output game [3,3,1,4] [4,1,3,2] [1,4,2,3] [3,2,4,1] false part04test15.diff part04test15.gts part04test14.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: [Horizontal ,Vertical] part04test15.output part04test15.output 126 6.15.5 stderr part04test15.err Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:41: Singleton variables: [Horizontal ,Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:44: Singleton variables: [Horizontal] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:48: Singleton variables: [Vertical] Warning: /home/grad/Classes/cse322/csce322hw0004/hxia/04/csce322hw04pt04.pl:54: Singleton variables: 6.16 Source Code 1 2 invalid(1, A, B):- A >= B. 3
4 invalid(-1, A, B):- A =< B. 5 6 invalidHo(Game, Vertical, X, 7 T is X - 1, 8 getElement(Vertical , T, Y, 9 10 getElement(Game, T, Y, A), 11 12 A \= -, 13 14 invalid(VE1, A, E). 15 16 invalidHo(Game, Vertical, X, Y, E):- 17 T is X + 1, 18 getElement(Vertical , X, Y, 19 getElement(Game, T, Y, B), 20 B \= -, 21 invalid(VE1, E, B). 22 23 24 invalidV(Game, Vertical, X, Y, E):- 25 T is Y - 1, 26 getElement(Vertical , X, T, 27 getElement(Game, X, T, A), 28 A \= -, 29 invalid(VE1, A, E). 30 31 invalidV(Game, Vertical, X, 32 T is Y + 1, 33 getElement(Vertical , X, Y, 34 getElement(Game, X, T, B), 35 B \= -, 36 37 38 invalid(VE1, E, B). 39 40 41 invalid(Game, Horizontal, 42 getElement(Game, X, Y, 43 44 invalid(Game, Horizontal, [Horizontal ,Vertical] csce322hw04pt04.pl Y, E):- VE1), VE1), VE1), Y, E):- VE1), Vertical, X, Y):- -), !. Vertical, X, Y):- 127 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 getElement(Game, X, Y, E), invalidHo(Game, Vertical, X, Y, E), !. invalid(Game, Horizontal, Vertical, X, Y):- getElement(Game, X, Y, E), invalidV(Game, Horizontal, X, Y, E). %% printGame(Horizontal), !. invalid(Game, Horizontal, Vertical, X, Y):- getElement(Game, X, Y, E), \+colsAndRows(Game, X, Y, E, [Y], [X]), !. colsAndRows(Game, X, Y, E, SameRow, SameCol):- findall(Z, getElement(Game, X, Z, E), SameRow), findall(Z, getElement(Game, Z, Y, E), SameCol). getElement(Game, X, Y, E):- nth0(X, Game, R), nth0(Y, R, E). getInvalidList(Game, Horizontal, Vertical, L):- findall([X, Y], invalid(Game, Horizontal, Vertical, X, Y), L). checkGame(Game,Horizontal,Vertical):- getInvalidList(Game, Horizontal, Vertical, []). 128