Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7062 赖梓乐 07切比雪夫距离 C++ Compile Error 0 MS 0 KB 518 2025-04-04 16:16:54

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,s,d,f; cin>>a>>s>>d>>f; int b=d-a,c=f-s; if(b<0){ b=b*(-1); } if(c<0){ c=c*-1; } if(c<b);{ cout<<b; else{ cout<<c; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:19:16: error: 'else' without a previous 'if'
                else{
                ^
Main.cc:24:1: error: expected '}' at end of input
 }
 ^