Help me in solving AOCC18 problem

My issue

My code

// Update the code below to solve the problem

#include <bits/stdc++.h>
using namespace std;

int main() 
{
	int t;
    cin >> t;
	
	while(t--)
	{
	    int N, K;
	    cin >> N >>K;
	    int height_list[N];
	    for(int i=0; i < N; i++)
	    {
	        cin >> height_list[i];
	    }
	    
	}
}

Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone

@ujwalgulhane31

In the problem statement, we need to find how many people have to be removed to restore line of sight. As the people that would need to be removed only have to be of height greater than K, we take a counter and count number of instances where height of someone is greater than K, i.e;

 if(height_list[i]>K)
	    {
	        counter++; 
	    }

Here is my updated code for reference.

// Update the code below to solve the problem

#include <bits/stdc++.h>
using namespace std;

int main() 
{
	int t;
    cin >> t;
	
	while(t--)
	{
	    int N, K;
	    cin >> N >>K;
	    int height_list[N],counter=0;
	    for(int i=0; i < N; i++)
	    {
	        cin >> height_list[i];
	        if(height_list[i]>K)
	        {
	            counter++; 
	        }
	        
	    }
	    cout<<c<<endl;
	    
	}
}