9 条题解
-
-3
#include #include #include #include #include // #include using namespace std; #define long long LL const int N = 1e6+6; const int INF = 0x3f3f3f3f; const int KFC=j8jl; int x1,y1,x2,y2; int ans(int x){ if (x > 0) return x; else return 0 - x; } int manhaton(int a1,int b1,int a2,int b2){ return ans(a1 - a2) + ans(b1 - b2); } int main(){ cin >> x1 >> y1 >> x2 >> y2; cout << manhaton(x1,y1,x2,y2); return 0; }
信息
- ID
- 816
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 3
- 标签
- 递交数
- 405
- 已通过
- 206
- 上传者