Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(int argc, const char * argv[]) {
- int a, b, c, d;
- cin >> a >> b;
- cin >> c >> d;
- if(abs(a-c) == 2 && abs(b-d) == 1) {
- cout << "DA" <<endl;
- } else if(abs(a-c) == 1 && abs(b-d) == 2) {
- cout << "DA" <<endl;
- }
- else
- cout << "NE" <<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment