Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72378 刘珩宇 07切比雪夫距离 C++ Accepted 0 MS 272 KB 218 2024-05-05 14:55:34

Tests(10/10):


Code:

# include<iostream> # include<cmath> using namespace std; int main(){ int x1,y1,x2,y2,a,b,c; cin>>x1>>y1>>x2>>y2; a=x2-x1; b=y2-y1; if(abs(a)>abs(b)){ c=a; } else{ c=b; } cout<<abs(c); return 0; }