Run ID:145680
提交时间: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; }