Competitive-Programming-and-Contests-VP-Solution

The repository that contains all solutions made for the course Competitive Programming and Contests by the University of Pisa

View the Project on GitHub

Wilbur and Array

Solved Solution Time :clock11:
:heavy_check_mark: Greedy algorithm 156 ms

Solution or Solution discussion

The general solution to find the number of step to make the array A equal to input array was reduced to a local problem to find and sum the difference from element in position steps += inputs[i] - inputs[i-1]. This solution use the greedy algorithm