SHARE
TWEET

Untitled

a guest Jan 21st, 2016 534 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2.  
  3. #define forn(i, n) for (int i = 0; i < int(n); i++)
  4. #define ford(i, n) for (int i = int(n) - 1; i >= 0; i--)
  5. #define fore(i, l, r) for (int i = int(l); i < int(r); i++)
  6. #define correct(x, y, n, m) (0 <= (x) && (x) < (n) && 0 <= (y) && (y) < (m))
  7. #define all(a) (a).begin(), (a).end()
  8. #define sz(a) int((a).size())
  9. #define pb(a) push_back(a)
  10. #define mp(x, y) make_pair((x), (y))
  11. #define x first
  12. #define y second
  13.  
  14. using namespace std;
  15.  
  16. typedef long long li;
  17. typedef long double ld;
  18. typedef pair<int, int> pt;
  19.  
  20. template<typename X> inline X abs(const X& a) { return a < 0? -a: a; }
  21. template<typename X> inline X sqr(const X& a) { return a * a; }
  22.  
  23. const int INF = int(1e9);
  24. const li INF64 = li(1e18);
  25. const ld EPS = 1e-9, PI = 3.1415926535897932384626433832795;
  26.  
  27. #define x1 ____x1
  28. #define y1 ____y1
  29.  
  30. li x1, y1;
  31. li x2, y2;
  32.  
  33. inline bool read() {
  34.     if (!(cin >> x1 >> y1)) return false;
  35.     assert(cin >> x2 >> y2);
  36.     return true;
  37. }
  38.  
  39. inline void solve() {
  40.     cout << max(abs(x1 - x2), abs(y1 - y2)) << endl;
  41. }
  42.  
  43. int main() {
  44. #ifdef SU1
  45.     assert(freopen("input.txt", "rt", stdin));
  46.     //assert(freopen("output.txt", "wt", stdout));
  47. #endif
  48.    
  49.     cout << setprecision(10) << fixed;
  50.     cerr << setprecision(5) << fixed;
  51.  
  52.     while (read()) {
  53.         solve();
  54.         //break;
  55.     }
  56.    
  57.     return 0;
  58. }
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