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.

Output. The output file must contain N lines, one number per line. Write the numberwritten on the first slip to the first line, the number written on the second slip to thesecond line and etc.ExampleInput Output Comment52 4 5 1304 3 1 803 5 1 100600701030304060After drawing for the first time the obtainedsum is 130 (30+40+60=130). After the secondtime the obtained sum is 80 (30+40+10=80).After the third drawing the sum is 100(30+60+10=100).Product of the last two slips is equal to 600(60×10=600), and the sum is equal to 70(60+10=70).61250. Engineering Preparation. It is the second day on the training ground. Cadetsare taught to lay anti-tank mines manually. Sergeant R. supplied cadets with amap and several mines. These mines should be carried in bags to the objects thatshould be mined. Anti-tank mine TM-72 weights several kilos.Cadets have to mine the territory. The map of the territory is divided into unitarysquares. The territory corresponding a unitary square in the map will be called a field.The field can contain some object or it can be empty. Objects can be of two kinds:• P-object; i.e. this object should be protected from possible attacks;• N- object; i.e. this object is not important; enemies will be able to movethrough the fields with N- objects without any loss.Objects are situated so that eight fields surrounding each object (M-object and N-object) are empty. Only empty fields can be mined (one mine per field).Enemy tanks can move from one field to another if squares corresponding to fieldsadjoin edges or corners on the map. Enemies can move without any loss in not minedfields only.BBBAAAa) b) c)Picture 250.1

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

Saved successfully!

Ooh no, something went wrong!