Czech ACM Student Chapter
Czech Technical University in Prague
Charles University in Prague
Technical University of Ostrava
ˇ a
Slovak University of Technology
Pavol Jozef Saf´rik University in Koˇice
University of Zilina
Masaryk University
Matej Bel University in Bansk´ Bystrica
University of West Bohemia
CTU Open Contest 2013
Fanatic Farmer Freddy
Freddy finds farming fullfilling. Not only that. He is literally obsessed with gardening. He spends
all of his free time on his garden, which has become really huge and fabulous during the last years.
While gardening, he often faces challenging problems. For some of them, a computer program
would be extremely helpful. Will you help him to write such programs? Fresh cucumbers will
be your reward!
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.
In the previous years, we found out that many teams do not read these introductory instructions.
So we have a little bonus for those who do. We reveal here that the easiest problem is the first
one. We recommend to solve it first.
All programs will read text from the standard input only. The results must be written to the
standard output. You are not allowed to use any other files, communicate over network, or
create processes. 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.
Good luck in the Czech Technical University Open Contest 2013!
This problem set consists of nine sheets of paper (including this one) containing eight problems.
Please make sure that you have the complete set.