My submissions for google kickstart programming competitions
#Round D (01/07/2020):
Rank 470/10000, 1st out of French contestants
Each problem consists of 2 subtasks: task 2 usually calls for an algorithm with a better complexity, and a more precise implementation.
Problem A (Broken Records): very straightforward -> find a rupture point in the given array
Problem B (Alien Piano): easy enough -> Is it possible to play a given sequence of musical notes on an instrument that can make only 4 notes, so that the variations in tone are respected ?
Problem C (Beauty of tree): much harder -> Two friends color a rooted tree: Player A chooses a node uniformely at random and colors every a-th node going up the tree. Player B does so with another color and for every b-th node. What is the expected value of the number of colored node ? Struggled with long double precision but got tasks 1 and 2 in the end.
Problem D (Locked Doors): solved only the first subtask -> You are in a museum and want to take as many pictures of the paintings in a given amount of time. But all of the doors are locked and it takes you different amounts of time for you to pick the locks. Where will you end up if you know your starting room and the time you will stay ?