31.07.2015 Views

LITHUANIAN OLYMPIADS INFORMATICS

LITHUANIAN OLYMPIADS INFORMATICS

LITHUANIAN OLYMPIADS INFORMATICS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

28Flats are numerated in the ordinary way: firstly flats of the first stairwell (floorsare counted starting from the first floor) are numerated, then flats of the second andetc. In the stairwells flats are numerated upwards.Task. Write a program to find:a) the number of floors in the house ;b) the number of flats in each stairwell;c) the floor of the flat offered to you;For example, if the input data are 24 3 2 6, the result should be: 4 8 3Explanation. Line of input data means that there are 24 flats, 3 stairwells in the house,there are 2 flats in the landing of each floor, and the number of flat you are offered is 6.From this data you can say that the house has 4 floors, there are 8 flats in eachstairwell, and flat you are offered to buy is on the 3rd floor.STAGE ISENIOR DIVISION205. Orienteering Competition (theoretical problem). In the picture there is given amap of locality containing points (marked with circles) and pathways connecting them.4 7WestVakarai1Picture 205.1Contestants must start runningfrom the start (the initialpoint), run each pathway onceand reach finish. The samepoint (even start and finishpoints) can be run through forseveral times. Start and finishpoints must be different.Unfortunately, whilepreparing the map layoutwith the computer, the arrows,which were indicatingthe directions of the pathways,were lost. Paste-updesigner could only rememberthat finish was to the West from the start. After studying the map closely it appearedthat it is possible to determine unambiguously the start and finish points.Task. Find start and finish points. Explain your solution briefly.Note. To make it easier to explain the solution, all points were numerated randomlyfrom the interval [1..9].206. Tomatoes. It is known an interesting fact: if one places some red tomatoesamong unripe tomatoes, the raw tomatoes will start mellowing quicker. There are n695283EastRytai

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!