Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
105279 | 胡海峰老师 | 07切比雪夫距离 | C++ | Accepted | 1 MS | 272 KB | 321 | 2025-01-12 21:32:14 |
#include <iostream> using namespace std; int main(){ int a,b; int c,d; cin>>a>>b>>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; }