The repository that contains all solutions made for the course Competitive Programming and Contests by the University of Pisa
Solved | Solution | Time |
---|---|---|
Greedy algorithm | 156 ms |
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