Josif_tepe

Untitled

Feb 21st, 2026
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int x1, x2, y1, y2;
  6.     cin >> x1 >> y1 >> x2 >> y2;
  7.    
  8.     if((abs(x1 - x2) == 1 and abs(y1 - y2) == 2) or (abs(x1 - x2) == 2 and abs(y1 - y2) == 1)) {
  9.         cout << "DA" << endl;
  10.     }
  11.     else {
  12.         cout << "NE" << endl;
  13.     }
  14.  
  15.     return 0;
  16.    
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment