| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 105278 | 胡海峰老师 | 07切比雪夫距离 | C++ | Compile Error | 0 MS | 0 KB | 293 | 2025-01-12 21:30:48 |
#include <iostream> using namespace std; int main(){ int a,b; int c,d; int delx = a-c; int dely = b-d; if delx<0: delx = -delx; if dely<0: dely = -dely; if delx>dely: cout<<delx; else cout<< dely; return 0; }
Main.cc: In function 'int main()':
Main.cc:9:8: error: expected '(' before 'delx'
if delx<0:
^
Main.cc:11:8: error: expected '(' before 'dely'
if dely<0:
^
Main.cc:13:8: error: expected '(' before 'delx'
if delx>dely:
^
Main.cc:15:5: error: 'else' without a previous 'if'
else
^
Main.cc:7:9: warning: unused variable 'delx' [-Wunused-variable]
int delx = a-c;
^