My issue
how to count the number of eligible voters from the given input.
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int T;
cin>>T;
while(T--){
int N,X;
cin>>N>>X;
int array[N];
cin>> array[N];
int eligible =0;
if(array[N]>=X){
eligible++;
cout<< eligible<<endl;
}
}
return 0;
}
Problem Link: Elections in Chefland Practice Coding Problem - CodeChef