Advertisement
Guest User

Hitahara Haruki's Gift

a guest
Jan 26th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int n;
  6.     cin>>n;
  7.     int S=0,w[n];
  8.     int a=0,b=0;
  9.     for(int i=0;i<n;i++)
  10.     {
  11.         cin>>w[i];
  12.         if(w[i]==100)
  13.             a++;
  14.         else
  15.             b++;
  16.         S+=w[i];
  17.     }
  18.     S/=2;
  19.     if(S%200 == 0)
  20.     {
  21.         cout<<"YES\n";
  22.         return 0;
  23.     }
  24.     if(S%200 == 100)
  25.     {
  26.         if(a>=1)
  27.         cout<<"YES\n";
  28.         else
  29.         cout<<"NO\n";
  30.         return 0;
  31.     }
  32.     cout<<"NO\n";
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement