fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. using ll = long long;
  4. int main(){
  5. ios::sync_with_stdio(false);
  6. cin.tie(nullptr);
  7. freopen("ROBOT.INP" , "r" , stdin);
  8. freopen("ROBOT.OUT" , "w" , stdout);
  9. ll x1 , x2 , y1 , y2;
  10. cin >> x1 >> y1;
  11. cin >> x2 >> y2;
  12. cout << max( abs(x1-x2) , abs(y1-y2) );
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0.01s 5272KB
stdin
0 0
4 5
stdout
5