Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5394 詹梓涵 07切比雪夫距离 C++ Accepted 0 MS 272 KB 311 2024-11-16 08:53:24

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int x,y,x1,y1,x2,y2; cin>>x1>>y1; cin>>x2>>y2; x=abs(x1-x2); y=abs(y1-y2); if(x>y){cout<<x<<endl;} else{cout<<y<<endl;} return 0; }