Problems from Baltic Olympiad in Informatics 2017, Day 1