public int solution(int[] A, int X, int Y) { int n = A.length; int[] cnt = new int[Y]; int res = (int)1e9; for (int start = 0; start < Y; start++) { if (start + (X - 1) * Y >= n) break; for (int i = 0; i < X; i++) { cnt[start] ...