you give array n integer you perform follow operation k time Choose indice j bmod k j bmod k 1 le j le n Swap a_i a_j after perform operation select k consecutive element sum k element score find maximum score getHere x bmod y denote remainder dividing x y