fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. void rd(int &x){
  4. int k, m=0;
  5. x=0;
  6. for(;;){
  7. k = getchar_unlocked();
  8. if(k=='-'){
  9. m=1;
  10. break;
  11. }
  12. if('0'<=k&&k<='9'){
  13. x=k-'0';
  14. break;
  15. }
  16. }
  17. for(;;){
  18. k = getchar_unlocked();
  19. if(k<'0'||k>'9'){
  20. break;
  21. }
  22. x=x*10+k-'0';
  23. }
  24. if(m){
  25. x=-x;
  26. }
  27. }
  28. void wt_L(const char c[]){
  29. int i=0;
  30. for(i=0;c[i]!='\0';i++){
  31. putchar_unlocked(c[i]);
  32. }
  33. }
  34. template<class S, class T> inline S min_L(S a,T b){
  35. return a<=b?a:b;
  36. }
  37. template<class S, class T> inline S max_L(S a,T b){
  38. return a>=b?a:b;
  39. }
  40. int main(){
  41. int c1, c2, h1, h2;
  42. rd(c1);
  43. rd(c2);
  44. rd(h1);
  45. rd(h2);
  46. if(max_L(c1, c2)<=min_L(h1, h2)){
  47. wt_L("YES");
  48. putchar_unlocked('\n');
  49. }
  50. else{
  51. wt_L("NO");
  52. putchar_unlocked('\n');
  53. }
  54. return 0;
  55. }
  56. // cLay varsion 20170505-2
  57.  
  58. // --- original code ---
  59. // {
  60. // int c1, c2, h1, h2;
  61. // rd(c1,c2,h1,h2);
  62. // if(max(c1,c2) <= min(h1,h2)) wt("YES"); else wt("NO");
  63. // }
  64.  
Time limit exceeded #stdin #stdout 5s 16064KB
stdin
Standard input is empty
stdout
Standard output is empty