Descriptions:

Beautiful Array

CodeForces - 1155D