#include <iostream>
using namespace std;
    
int main() {
    int n,k,p;
  
    int cnt = 0;
    int cnt2 = 0;
    cin >> n >> k >> p;
    int arr[n*k];
    for (int i = 0;i < n*k;i++) {
        cin >> arr[i];
    }
    for(int i = 0;i < n;i++){   
        for(int j = 0;j < k;j++){
            if(arr[i*k+j] == 0){   
                cnt ++;
            }
        }
        if(cnt < p){
            cnt2++;
        }
        cnt=0;
    }
        
    cout << cnt2;
    
    return 0;
  
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: