#include <bits/stdc++.h>   const int N = 200;   char a[N][N];   int main() {     int n, m, k;     std::cin >> n >> m >> k;     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         std::cin >> a[i][j];       }     }     int ret = 0;     int replaces = 0;     for (int j = 0; j < m; j++) {       int past = 0;       int maxOnes = 0;       int curReplaces = 0;       for (int i = 0; i < n; i++) {         if (a[i][j] !=  1 ) continue;         int ones = 0;         for (int x = i; x < std::min(n, i + k); x++) {           if (a[x][j] ==  1 ) ones++;         }         if (ones > maxOnes) {           maxOnes = ones;           curReplaces = past;         }         past++;       }       ret += maxOnes;       replaces += curReplaces;     }     std::cout << ret <<     << replaces <<   n ;     return 0;   }   