Please read the new rule regarding the restriction on the use of AI tools. ×

Codeforces global round 23

Revision en1, by dear_earth, 2022-10-15 21:25:48

23A - You're Given a String... 176341384

include<bits/stdc++.h>

using namespace std; int main(){

int t;
cin>>t;
while(t--){
    int n,k;
    cin>>n>>k;
    int cnt0=0;
    int arr[n];
    for(int i=0;i<n;i++){
        cin>>arr[i];
        if(arr[i]==0){
            cnt0++;
        }
    }
    if(cnt0==n){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
}

return 0; }

Tags greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dear_earth 2022-10-15 21:25:48 527 Initial revision (published)