SHARE
TWEET

Untitled

mfgnik May 31st, 2020 (edited) 803 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. int main() {
  4.     int current_x, current_y, requested_x, requested_y;
  5.     std::cin >> current_x >> current_y >> requested_x >> requested_y;
  6.     if (abs(current_x - requested_x) == abs(current_y - requested_y) || current_x == requested_x || current_y == requested_y) {
  7.         std::cout << "YES";
  8.     } else {
  9.         std::cout << "NO";
  10.     }
  11.     return 0;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top