Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
145841 周润泽 07切比雪夫距离 C++ Compile Error 0 MS 0 KB 347 2026-01-25 19:14:40

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main() { long long x1,x2,y1,y2; cin>>x1>>X2>>y1>>y2; if(x1>=x2&&y1>=y2){ cout<<max(x1-x2,y1-y2); }else if(x1>=x2&&y1<=y2){ cout<<max(x1-x2,y2-y1); }else if(x1<=x2&&y1>=y2){ cout<<max(x2-x1,y1-y2); }else if(x1<=x2&&y1<=y2){ cout<<max(x2-x1,y2-y1); }else return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:10: error: 'X2' was not declared in this scope
 cin>>x1>>X2>>y1>>y2;
          ^