fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. // Numeric Constants
  5. #define N 1000000007
  6. #define maxs 200005
  7. #define mins 1005
  8. #define eps 1e-14
  9. #define imax 2000000200
  10. #define llmax 1000000002000000000ll
  11. #define pi 3.141592653589793
  12.  
  13. // Others
  14. #define ll long long
  15. #define pb push_back
  16. #define gc getchar_unlocked
  17. #define iosbase ios_base::sync_with_stdio(false)
  18. #define pii pair<int,int>
  19. #define pll pair<ll,ll>
  20. #define ppi pair<pair<int,int>,int>
  21. #define ppl pair<pll,ll>
  22. #define vi vector<int>
  23. #define sc scanf
  24. #define pr printf
  25. #define lld I64d
  26. #define F first
  27. #define S second
  28. #define siter set<int>::iterator
  29. #define p_pq priority_queue
  30. #define ub upper_bound
  31. #define lb lower_bound
  32.  
  33. int main()
  34. {
  35. int w,x,y,z;
  36. cin>>w>>x>>y>>z;
  37. if(w>=(x+y+z)){
  38. pr("Happy\n");
  39. }
  40. else{
  41. pr("Sad\n");
  42. }
  43. return 0;
  44. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Sad