Run ID:145847

提交时间:2026-01-25 19:16:08

#include <bits/stdc++.h> using namespace std; int main() { long long x1,x2,y1,y2; cin>>x1>>y1>>x2>>y2; if(x1>=x2&&y1>=y2){ cout<<max(x1-x2,y1-y2); }else if(x1>=x2&&y1<=y2){ cout<<max(x1-x2,y2-y1); }else if(x1<=x2&&y1>=y2){ cout<<max(x2-x1,y1-y2); }else if(x1<=x2&&y1<=y2){ cout<<max(x2-x1,y2-y1); }else return 0; }