Reduce the array

Problem Name:
Reduce the array
Site:Spoj
Links:
Tags:
Problem setters: