Advertisement
Promi_38

cf 1230A

Oct 2nd, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a[4], i;
  8.     for(i = 0; i < 4; i++) scanf("%d", &a[i]);
  9.    
  10.     sort(a, a+4);
  11.    
  12.     if((a[0] + a[3] == a[1] + a[2]) || (a[0] + a[1] + a[2] == a[3])) printf("YES\n");
  13.     else printf("NO\n");
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement