Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
142142 王润中 07切比雪夫距离 C++ Compile Error 0 MS 0 KB 991 2025-12-30 20:28:15

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { int a,b,c,d; cin>>a>>b>>c>>d; if((a>c&&d)||(b>c&&d)) { if((a-c>b-c)||(a-c>b-d)||(a-d>b-c)||(a-d>b-d)) } { if(a-c>a-d) { cout<<a-c; } else { cout<<a-d; } } else { if(b-c>b-d) { cout<<b-c; } else { cout<<b-d; } else { if((c-a>c-b)||(c-a>d-b)||(d-b>c-b)||(d-a>d-b)) } { if(c-a>d-a) { cout<<c-a; } else { cout<<d-a; } } else { if(c-b>d-b) { cout<<c-b; } else { cout<<d-b; } } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:5: error: expected primary-expression before '}' token
     }   {
     ^
Main.cc:20:9: error: 'else' without a previous 'if'
         else
         ^
Main.cc:30:5: error: 'else' without a previous 'if'
     else
     ^
Main.cc:33:5: error: expected primary-expression before '}' token
     }   {
     ^
Main.cc:43:9: error: 'else' without a previous 'if'
         else
         ^
Main.cc:54:1: error: expected '}' at end of input
 }
 ^