Josif_tepe

Untitled

Feb 26th, 2026
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(int argc, const char * argv[]) {
  4.     int a, b, c, d;
  5.     cin >> a >> b;
  6.     cin >> c >> d;
  7.    
  8.     if(abs(a-c) == 2 && abs(b-d) == 1) {
  9.         cout << "DA" <<endl;
  10.     } else if(abs(a-c) == 1 && abs(b-d) == 2) {
  11.         cout << "DA" <<endl;
  12.     }
  13.     else
  14.         cout << "NE" <<endl;
  15. }
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment