Problems from Baltic Olympiad in Informatics 2018, day 1