Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
96014 汤弘毅 07切比雪夫距离 C++ Wrong Answer 1 MS 272 KB 850 2024-11-02 17:20:14

Tests(0/10):


Code:

#include <iostream> using namespace std; int main(){ // int a,b; // cin>>a>>b; // if(a>b){ // cout<<a; // } // else{ // cout<<b; // } // int a; // cin>>a; // if(a>0){ // cout<<"YES"; // } // else{ // cout<<"NO"; // } // int a,b,c; // cin>>a>>b>>c; // if(a+b>c){ // cout<<"Yes"; // } // else{ // cout<<"No"; // } // float n,t,s; // cin>>n>>t>>s; // int x; // // x = n-s/t; // float y; // y = n-s/t; // // if(x>y){ // x = x+1; // } // if(x<0){ // x=0; // } // // cout<<x; // int a,b; // cin>>a>>b; // if(a>b){ // cout<<b<<" "<<a; // } // else{ // cout<<a<<" "<<b; // } int x,y; int x1,y1; int dx,dy; cin>>x>>y>>x1>>y1; if(x1>x){ dx = x1-x; } else{ dx = x-x1; } if(y1>y){ dy = y1-y; } else{ dy = y-y1; } cout<<dx+dy; }


Run Info:

------Input------
37 85 25 78
------Answer-----
12
------Your output-----
19