Yet Another Array Restoration

Problem Name:
Yet Another Array Restoration
Site:CodeForces
Links:
Tags:
Problem setters: