#include <iostream>
    
using namespace std;
    
int main() {
    int n ,k ,p;
    int cnt = 0;
    int emy = 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){
            emy ++;
        }
        
        cnt=0;
    }
        
    cout << emy;
    
    return 0;
}

Embed on website

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