fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main (){
  5. int n,hun =0,twoHun=0,num;
  6. cin >> n;
  7. while (n--){
  8. cin >> num;
  9. if (num %200 ==0) twoHun += num;
  10. else hun += num;
  11.  
  12. }
  13. if(abs(hun -twoHun)%200==100){
  14. cout << "NO";
  15. return 0;
  16. }
  17. if((twoHun/200)%2!=0 && hun ==0){
  18. cout << "NO";
  19. return 0;
  20. }
  21. cout << "YES";
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5272KB
stdin
3
100 200 200
stdout
NO