Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- int S=0,w[n];
- int a=0,b=0;
- for(int i=0;i<n;i++)
- {
- cin>>w[i];
- if(w[i]==100)
- a++;
- else
- b++;
- S+=w[i];
- }
- S/=2;
- if(S%200 == 0)
- {
- cout<<"YES\n";
- return 0;
- }
- if(S%200 == 100)
- {
- if(a>=1)
- cout<<"YES\n";
- else
- cout<<"NO\n";
- return 0;
- }
- cout<<"NO\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement