Skip to main content
2 of 5
added 79 characters in body
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384

05AB1E, 15 14 bytes

εDO5÷FR]{øÆ1‹P

Try it online or verify all test cases.

Explanation:

ε        # Map both pairs in the (implicit) input to:
 D       #  Duplicate the pair
  O      #  Pop this duplicate and calculate its sum
   5÷    #  Integer-divide it by 5
     F   #  Loop that many times:
      R  #   Reverse the pair every iteration
         #   (the pair is reversed for odd sums; and remains unchanged for even sums)
]        # Close both the loop and map
         # (all pairs are now in the order [A,B])
 {       # Sort the list of pairs from lowest to highest
  ø      # Zip/transpose; swapping rows/columns
   Æ     # Reduce each inner pair by subtracting
    1‹   # Check for both values if they're smaller than 1 (thus no score is decreasing)
      P  # And check if both are truthy
         # (after which the result is output implicitly)
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384