| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 145680 | 冯祥瑞 | 07切比雪夫距离 | C++ | Accepted | 0 MS | 196 KB | 314 | 2026-01-25 18:01:35 |
#include <stdio.h> #include <stdlib.h> // 为了使用 abs 函数 int main() { int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d); int dx = abs(a - c); int dy = abs(b - d); int distance = (dx > dy) ? dx : dy; // 取较大值 printf("%d\n", distance); return 0; }