Advertisement
Saleh127

CF 1436A

Oct 25th, 2020
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. test
  11. {
  12. ll a,c,m,e=0,f;
  13. cin>>a>>m;
  14. while(a--)
  15. {
  16. cin>>f;
  17. e+=f;
  18. }
  19. if(m==e) cout<<"YES"<<endl;
  20. else cout<<"NO"<<endl;
  21. }
  22.  
  23.  
  24. return 0;
  25. }
  26.  
Advertisement
RAW Paste Data Copied
Advertisement