Hackerrank Angry Professor Solution
The below program is the solution of Angry Professor in Implementation sub-domain. You can get the question HERE.
Output :
Code :
#include<iostream> using namespace std; int main() { int t,x,y,c=0,m; cin>>t; while(t--) { cin>>x>>y; while(x--) { cin>>m; if(m<=0) c++; } if(c>=y) cout<<"NO"<<endl; else cout<<"YES"<<endl; c=0; } return 0; }
Comments
Post a Comment