Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
115905 | 蔡胤泽 | 07切比雪夫距离 | C++ | Accepted | 1 MS | 272 KB | 311 | 2025-04-05 15:47:41 |
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, x, y; cin >> a >> b >> c >> d; x = a-c; if(x<0) { x = -x; } y = b-d; if(y<0) { y= -y; } if(x >= y) { cout << x << endl; } else { cout << y << endl; } return 0; }