img
Czech ACM Student Chapter
Czech Technical University in Prague
Charles University in Prague
Technical University of Ostrava
acm
ˇ ´
Slovak University of Technology
Pavol Jozef Safarik University in Koˇice
s
cz
ˇ
University of Zilina
Masaryk University
Matej Bel University in Bansk´ Bystrica
a
University of West Bohemia
CTU Open Contest 2012
From Insect Life
We have prepared a set of problems dealing with the life of insects. To our knowledge, this topic
ˇ
has not been extensively studied since the theatrical play by Capek brothers in 1921.
You will meet again all the heroes that have been introduced yesterday, such as Andrew the
Ant, Charlie the Cockchafer, or Gregory the Grasshopper. In addition, we will also talk about
their other insect friends. Since you may not be familiar with English names of some insect
species, here is a small vocabulary for you:
English
Latin
Czech
Slovak
Centipede
Scolopendra cingulata
stonoˇka
z
ston^ˇka
oz
Cockchafer
Melolontha melolontha
chroust
chrust
´
Grasshopper
Tettigonia viridissima
kobylka
kobylka
Ladybug
Coccinella septempunctata
slun´ˇko ("beruˇka")
ec
s
lienka
Rhinoceros
Oryctes nasicornis
nosoroˇ´k
zi
nosoroˇtek
z
Your programs can be written in C, C++, or Java programming languages. The choice is yours
but you will be fully responsible for the correctness and efficiency of your solutions. We need
the correct answer produced in some appropriate time. Nothing else matters. You may choose
any algorithm and any programming style.
All programs will read text from the standard input. The results must be written to the standard
output. Input and output formats are described in problem statements and must be strictly
followed. Do not print anything more than required. Each text line (including the last one)
should be terminated by a newline character ("\n"), which is not considered to be a part of that
line. You are not allowed to use any other files, communicate over network, or create processes.
Good luck in the Czech Technical University Open Contest 2012!
This problem set consists of 9 sheets of paper (including this one) and contains eight problems.
Please make sure that you have the complete set.