Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
145150 李昊阳 07切比雪夫距离 C++ Compile Error 0 MS 0 KB 268 2026-01-25 09:08:26

Tests(0/0):


Code:

#include <iostream> #include <algorithm> #include <cmath> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int x = abs(a - c); int y = abs(b - d); int d = max(x, y); cout << d << endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:9: error: redeclaration of 'int d'
     int d = max(x, y);
         ^
Main.cc:6:18: note: 'int d' previously declared here
     int a, b, c, d;
                  ^