-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.txt
102 lines (93 loc) · 3.54 KB
/
task.txt
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
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
Cubes Puzzle Task
Create a computer program that solves the given cubes puzzles and
prints the solution(s) in ASCII format into a file in unfolded format
as given below as an example.
- Develop the solution yourself. Do not try to find a shortcut by
using the web.
- Develop the solution in Java using maven as build tool.
- The core of the solution should be written without any add-ons to
the core of the programming language. Use only the defined language
standard (e.g. you can use all features that you find in a standard Sun JDK).
This means that you can use external libraries, but your program
should still produce the wanted solutions after removing those
parts. For example, if you would decide to use a logging library
then your program would still work correctly after removing all
parts that use the logging library. You can also use JUnit.
- Optimize for speed of development and quality of development. Do
not optimize for runtime execution speed. The problem is small and
you can afford to waste a few milli seconds. It is better to focus
on getting a working solution faster.
- Deliver your result in the best professional quality you can
produce. Polish your solution. Make a master piece out of it. It
is part of this task to compare what different people consider to
be a professional quality solution.
- You do not need to create a "reader" for the input pieces. Just
encode the input pieces directly into your program in your
programming language of choice.
Have a look at the following link for some background information:
http://www.happycube.com/
Here is an example:
The pieces of the blue cube look as follows:
o o o o o
ooo ooooo oooo
ooooo ooo oooo
ooo ooooo oooo
o o o o o
o o o o o o
oooo ooooo oooo
oooo ooo oooo
oooo ooooo oooo
oo o o o oo oo
One of the solutions in "unfolded form" looks as follows:
o o o o o
ooo ooooo ooo
ooooo ooo ooooo
ooo ooooo ooo
o o oo o
o o
ooooo
ooo
ooooo
o o
o o o
ooooo
ooo
ooooo
o o o
o o
oooo
oooo
oooo
oo o
Additional challenge 1 : All unique solutions :
In the base task you are only required to find one solution and to
print it into a file. The additional challenge 1 is to extend your
program to find all unique solutions. A solution is unique if it
cannot be transformed into another solution by rotating or mirroring
in 3 dimensions.
Additional challenge 2 : How many different cubes exist :
In the file that you got together with this description you can see
the pieces of 4 different cubes. The pieces are such that you can plug
them together in a plane in the order:
1 2 3
4 5 6
And you can create a cube out of them. How many different sets of
pieces that fulfill these two criteria exist? One set is different
from the other if not all pieces in one set have a corresponding
matching piece in the other set. A corresponding matching piece is a
piece into which you can transform your piece at hand by rotating or
mirroring it in two dimensions. No side of a piece must be "flat",
e.g. a piece that looks like this:
ooooo
ooooo
ooooo
ooooo
ooooo
would not be allowed. The piece must be physikal producible, e.g a
piece that has a corner like this is not allowed:
o
oooo
oooo
oooo
oooo
Here the corner would easily break and fall off.