Saleh127

cc ltime88 A

Sep 26th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1.  
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4. #define ll long long
  5. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  6. int main()
  7. {
  8. ios_base::sync_with_stdio(0);
  9. cin.tie(0);cout.tie(0);
  10.  
  11. test
  12. {
  13. ll a[10000],c,d=0,e,f,i,j,k,l;
  14. cin>>c;
  15. for(i=0;i<c;i++)
  16. {
  17. cin>>a[i];
  18. d+=a[i];
  19. }
  20. if(d>=0) cout<<"YES"<<endl;
  21. else cout<<"NO"<<endl;
  22. }
  23.  
  24.  
  25. return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment