| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65591 | 邓嘉懿 | 07切比雪夫距离 | C++ | Compile Error | 0 MS | 0 KB | 307 | 2024-01-26 12:55:53 |
#include<iostream> using namespace std; int main(){ int x1,x2,y2,y2; int n=0,z=0; scanf("%d%d%d%d",&x1,&x2,&y1,&y2); if(x1>x2){ n=x1-x2; }else{ n=x2-x1 } if(y1>y2){ z=y1-y2; }else{ z=y2-y1; } if(n>z){ printf("%d",n); }else{ printf("%d",z); } return 0; }
Main.cc: In function 'int main()':
Main.cc:4:15: error: redeclaration of 'int y2'
int x1,x2,y2,y2;
^
Main.cc:4:12: note: 'int y2' previously declared here
int x1,x2,y2,y2;
^
Main.cc:6:28: error: 'y1' was not declared in this scope
scanf("%d%d%d%d",&x1,&x2,&y1,&y2);
^
Main.cc:11:2: error: expected ';' before '}' token
}
^