| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65593 | 戴文博 | 07切比雪夫距离 | C++ | Accepted | 2 MS | 268 KB | 336 | 2024-01-26 12:58:31 |
#include<iostream> #include<cstdio> using namespace std; int main(){ int x1,x2,y1,y2; int n=0,z=0; scanf("%d%d%d%d",&x1,&y1,&x2,&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; }