Sum first k, then slide: add right, remove left. Track max sum/k.
Input
6 4 1 12 -5 -6 50 3
Output
12.75000
1 1 5
5.00000