KöMaL Problems in Informatics, April 2008
Please read the rules of the competition.
Show/hide problems of signs:
Problems with sign 'I'
Deadline expired on May 15, 2008.
I. 184. Trimino is a creative game to develop students' skills. A trimino triangle is cut into smaller triangles and during the game students should reassemble these into the original triangle: in the example, names of the ions should be matched with their correct chemical formulae next to them.
Using a suitable program (we recommend, for example, Inkscape, a free vector-graphics editor), draw the trimino in the example about compound ions.
The image in the default format of the drawing program and in a popular format (i184.png, i184.gif, ...) together with a short documentation (i184.txt, i184.pdf, ...) should be submitted, containing a brief description of your solution and the name of the software used.
I. 185. Horses are tied up along a long line when they are fed. Various provender is placed into the feeder, because horses like different fodders. Tethers are a bit loose such that every horse can change places with a neighbouring horse but not with second and farther ones.
Your program should give all possible orders of the horses and list their names as well. The input file (as the first command line parameter to your program) contains the number of horses and their names. The name of the output file is given as the second command line parameter.
The first line of the input file is the number of horses (1N100), the following N lines then contain the name of each horse as standing tied up along the feeder. The first line of the output text file should contain the number of possible orders of the horses, then the actual arrangements of the horses in each line of the file should follow. (In the example, ``Példa'' means ``Example'', ``be.txt'' means input.txt, while ``ki.txt'' is output.txt.)
The source code of your program (i185.pas, i185.cpp, ...) together with a short documentation (i185.txt, i185.pdf, ...) should be submitted, also containing a brief description of your solution and the name of the developer environment to use.
I. 186. Problem C. 392. in our 2008 February issue asked the following: ``How many triangles of different shapes are there in which the measures of the angles in degrees are all integers?''
Prepare a spreadsheet which answers the above question on sheet ``Angles'', further, on sheet ``Sides'' it answers ``How many different triangles with integer side lengths are there such that the perimeter is at most 180?''
Results in both cases should appear in cell A1. Your solution should not use macros or program modules, only formulae and built-in functions.
Your sheet (186.xls, i186.ods, ...) together with a short documentation (i186.txt, i186.pdf, ...) should be submitted containing a description of your solution and the name and version number of the spreadsheet application.
Problems with sign 'S'
Deadline expired on May 15, 2008.
S. 35. We are given n points (1n100) in the plane, each with integer coordinates. We would like to select some of these points such that one can always connect an arbitrary non-selected point and a suitable selected point with a line segment that contains only these two points and no others from the original set. Your task is to give such a selection with the above property, having the minimal number of elements.
Coordinate pairs are given in consecutive lines of a text file, separated by a space. The name of the input and output files are given as first and second command line arguments to your program. The output file should contain a list of the selected points in a similar format.
In the example, ``Bemenet'' means ``Input'', and ``Kimenet'' means ``Output''.
The source code of your program (s35.pas, s35.cpp, ...) together with a short documentation (s35.txt, s35.pdf, ...) should be submitted, also containing a short description of your code and the name of the developer environment to use.
Upload your solutions above