criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  int64_t A=a*c;
  int B=a*d;
  int C=b*c;
  int D=b*d;
  cout << max({A, B, C, D}) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   11 |   cout << max({A, B, C, D}) << endl;
      |           ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:11:14: note:   deduced conflicting types for parameter '_Tp' ('long int' and 'int')
   11 |   cout << max({A, B, C, D}) << endl;
      |           ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  int64_t A=a*c;
  int B=a*d;
  int C=b*c;
  int D=b*d;
  max({A, B, C, D});
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   11 |   max({A, B, C, D});
      |   ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:11:6: note:   deduced conflicting types for parameter '_Tp' ('long int' and 'int')
   11 |   max({A, B, C, D});
      |   ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
 cout << max(max((a*b), (a*c)) max((b*c), (b*d))) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:31: error: expected ')' before 'max'
    6 |  cout << max(max((a*b), (a*c)) max((b*c), (b*d))) << endl;
      |             ~                 ^~~~
      |                               )
a.cc:6:13: error: no matching function for call to 'max(const int&)'
    6 |  cout << max(max((a*b), (a*c)) max((b*c), (b*d))) << endl;
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:6:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    6 |  cout << max(max((a*b), (a*c)) max((b*c), (b*d))) << endl;
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C

#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main(void){
    ll a,b,c,d;
    cin>>a>>b>>c>>d;
    ll ans =max(a*c,max(a*d,max(b*c,b*d)));
    cout<<ans<<endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  long long a,b,c,d,ans[100000];
  cin >> a >> b >> c >> d;
  if (a>=0 && d<0) cout << a*d << endl;
  else if (b<0 && c>=0) cout << b*c << endl;
  else if (b<0 && d<0) cout << a*c << endl;
  else cout << b*d << endl;
  cout <<  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected primary-expression before '<<' token
   10 |   cout <<  << endl;
      |            ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  long long a,b,c,d,ans[100000];
  cin >> a >> b >> c >> d;
  long long X,Y;
  if (a>=0 && d<0) cout << a*d << endl;
  else if (b<0 && c>=0) cout << b*c << endl;
  else if (b<0 && d<0) cout << a*c << endl;
  else cout << b*d << endl;
  cout <<  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected primary-expression before '<<' token
   11 |   cout <<  << endl;
      |            ^~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main() {
    long long  a, b, c, d;
    cin >> a >> b >> c >> d;
    vector<long long> v {a*c, a*d, b*c, b*d};
    sort(v.begin(), v.end());
    cout << v[3];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |     sort(v.begin(), v.end());
      |     ^~~~
      |     short
Language: C++

#include <iostream>
using namespace std;
int main() {
  ll a, b, c, d;
  cin >> a >> b >> c >> d;
  cout << max(a * c, max(a * d, max(b * c, b * d))) << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll a, b, c, d;
      |   ^~
a.cc:5:10: error: 'a' was not declared in this scope
    5 |   cin >> a >> b >> c >> d;
      |          ^
a.cc:5:15: error: 'b' was not declared in this scope
    5 |   cin >> a >> b >> c >> d;
      |               ^
a.cc:5:20: error: 'c' was not declared in this scope
    5 |   cin >> a >> b >> c >> d;
      |                    ^
a.cc:5:25: error: 'd' was not declared in this scope
    5 |   cin >> a >> b >> c >> d;
      |                         ^
Language: C

#include <stdio.h>

int main(void) {
	// your code goes here
	int	a,b,c,d
	scanf("%d",&a,&b,&c,&d);
	if(b>a&&d>c)
	printf("b*d");
	else(a>b&&c>d);
	printf("a*c");
	else(b==0&&d==0);
	printf("a*c");
	else(a==0&&c==0);
	printf("b*d");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |         scanf("%d",&a,&b,&c,&d);
      |         ^~~~~
main.c:7:17: error: 'd' undeclared (first use in this function)
    7 |         if(b>a&&d>c)
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:9: error: 'else' without a previous 'if'
   11 |         else(b==0&&d==0);
      |         ^~~~
main.c:13:9: error: 'else' without a previous 'if'
   13 |         else(a==0&&c==0);
      |         ^~~~
Language: C

#include <stdio.h>
int main(void) {
int a,b,c,d,e,f,g,h;
scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
a*c==e;
a*d==f;
b*c==g;
b*d==h;
if(f<=e&&g<=e&&h<=e)
printf("%d",e);
else if(e<=f&&g<=f&&h<=f)
prinyf("%d",f);
else if(e<=g&&f<=g&&h<=g)
printf("%d",g);
else
printf("%d",h);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:1: error: implicit declaration of function 'prinyf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   12 | prinyf("%d",f);
      | ^~~~~~
      | printf
Language: C

int main(void) {
int a,b,c,d,e,f,g,h;
scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
a*c==e;
a*d==f;
b*c==g;
b*d==h;
if(f<=e&&g<=e&&h<=e)
printf("%d",e);
else if(e<=f&&g<=f&&h<=f)
prinyf("%d",f);
else if(e<=g&&f<=g&&h<=g)
printf("%d",g);
else
printf("%d",h);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 | printf("%d",e);
      | ^~~~~~
main.c:9:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:1: error: implicit declaration of function 'prinyf' [-Wimplicit-function-declaration]
   11 | prinyf("%d",f);
      | ^~~~~~
main.c:13:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   13 | printf("%d",g);
      | ^~~~~~
main.c:13:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   15 | printf("%d",h);
      | ^~~~~~
main.c:15:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(void) {
int a,b,c,d,e,f,g,h;
scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
a*c=e;
a*d=f;
b*c=g;
b*d=h;
if(f<=e&&g<=e&&h<=e)
printf("%d",e);
else if(e<=f&&g<=f&&h<=f)
prinyf("%d",f);
else if(e<=g&&f<=g&&h<=g)
printf("%d",g);
else
printf("%d",h);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:4: error: lvalue required as left operand of assignment
    4 | a*c=e;
      |    ^
main.c:5:4: error: lvalue required as left operand of assignment
    5 | a*d=f;
      |    ^
main.c:6:4: error: lvalue required as left operand of assignment
    6 | b*c=g;
      |    ^
main.c:7:4: error: lvalue required as left operand of assignment
    7 | b*d=h;
      |    ^
main.c:9:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 | printf("%d",e);
      | ^~~~~~
main.c:9:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:1: error: implicit declaration of function 'prinyf' [-Wimplicit-function-declaration]
   11 | prinyf("%d",f);
      | ^~~~~~
main.c:13:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   13 | printf("%d",g);
      | ^~~~~~
main.c:13:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   15 | printf("%d",h);
      | ^~~~~~
main.c:15:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C


int main(void) {
	// your code goes here
	int	a,b,c,d
	scanf("%d",&a,&b,&c,&d);
	if(b>a&&d>c)
	printf("b*d");
	else(a>b&&c>d);
	printf("a*c");
	else(b==0&&d==0);
	printf("a*c");
	else(a==0&&c==0);
	printf("b*d");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    5 |         scanf("%d",&a,&b,&c,&d);
      |         ^~~~~
main.c:6:17: error: 'd' undeclared (first use in this function)
    6 |         if(b>a&&d>c)
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("b*d");
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | 
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    7 |         printf("b*d");
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |         printf("a*c");
      |         ^~~~~~
main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:9: error: 'else' without a previous 'if'
   10 |         else(b==0&&d==0);
      |         ^~~~
main.c:12:9: error: 'else' without a previous 'if'
   12 |         else(a==0&&c==0);
      |         ^~~~
Language: C

int main(void) {
	// your code goes here
	int	a,b,c,d
	scanf("%d",&a,&b,&c,&d);
	if(b>a&&d>c)
	printf("b*d");
	else(a>b&&c>d);
	printf("a*c");
	else(b==0&&d==0);
	printf("a*c");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    4 |         scanf("%d",&a,&b,&c,&d);
      |         ^~~~~
main.c:5:17: error: 'd' undeclared (first use in this function)
    5 |         if(b>a&&d>c)
      |                 ^
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |         printf("b*d");
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:6:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    6 |         printf("b*d");
      |         ^~~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    8 |         printf("a*c");
      |         ^~~~~~
main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:9: error: 'else' without a previous 'if'
    9 |         else(b==0&&d==0);
      |         ^~~~
Language: C

int main(void) {
	// your code goes here
	int	a,b,c,d
	scanf("%d",&a,&b,&c,&d);
	if(b>a&&d>c)
	printf("b*d");
	else(a>b&&c>d)
	printf("a*c");
	else(b==0&&d==0)
	printf("a*c");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    4 |         scanf("%d",&a,&b,&c,&d);
      |         ^~~~~
main.c:5:17: error: 'd' undeclared (first use in this function)
    5 |         if(b>a&&d>c)
      |                 ^
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |         printf("b*d");
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:6:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    6 |         printf("b*d");
      |         ^~~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:23: error: expected ';' before 'printf'
    7 |         else(a>b&&c>d)
      |                       ^
      |                       ;
    8 |         printf("a*c");
      |         ~~~~~~         
main.c:9:9: error: 'else' without a previous 'if'
    9 |         else(b==0&&d==0)
      |         ^~~~
main.c:9:25: error: expected ';' before 'printf'
    9 |         else(b==0&&d==0)
      |                         ^
      |                         ;
   10 |         printf("a*c");
      |         ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  long a,b,c,d;
  cin>>a>>b>>c>>d;
  vector<long>v;
  v.pb(a*c);
  v.pb(a*d);
  v.pb(b*c);
  v.pb(b*d);
  sort(v.begin(),v.end());
  cout<<v[v.size()-1];
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'class std::vector<long int>' has no member named 'pb'
    8 |   v.pb(a*c);
      |     ^~
a.cc:9:5: error: 'class std::vector<long int>' has no member named 'pb'
    9 |   v.pb(a*d);
      |     ^~
a.cc:10:5: error: 'class std::vector<long int>' has no member named 'pb'
   10 |   v.pb(b*c);
      |     ^~
a.cc:11:5: error: 'class std::vector<long int>' has no member named 'pb'
   11 |   v.pb(b*d);
      |     ^~
Language: C++

int main() {
	long long a, b, c, d;
	cin >> a>>b>>c>>d;
	
	cout << b * d << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> a>>b>>c>>d;
      |         ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << b * d << endl;
      |         ^~~~
a.cc:5:26: error: 'endl' was not declared in this scope
    5 |         cout << b * d << endl;
      |                          ^~~~
Language: C++

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d;int p = INT_MAX;
    cin>>a>>b>>c>>d;
    if(b>0&&d>0)
    cout<<b*d;
    else if(b>0&&d<0)
    cout<<a*d;
    else if(b<0&&d>0)
    cout<<a*d;
    else
    cout<<b*d;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'INT_MAX' was not declared in this scope
   15 |     int a,b,c,d;int p = INT_MAX;
      |                         ^~~~~~~
a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    9 | #include <iostream>
  +++ |+#include <climits>
   10 |
Language: Java

import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    
    long int a = scan.nextInt();
    long int b = scan.nextInt();
    long int c = scan.nextInt();
    long int d = scan.nextInt();
    
    long long[] ans = new long long[4];
    
    ans[0] = a * c;
    ans[1] = a * d;
    ans[2] = b * c;
    ans[3] = b * d;
    long int max = ans[0];
    
    for (int i = 1;i < 4;i ++) {
      if (max < ans[i])
        max = ans[i];
    }
    System.out.println(max);
  }
}
        


Compiler output:
Main.java:7: error: not a statement
    long int a = scan.nextInt();
    ^
Main.java:7: error: ';' expected
    long int a = scan.nextInt();
        ^
Main.java:8: error: not a statement
    long int b = scan.nextInt();
    ^
Main.java:8: error: ';' expected
    long int b = scan.nextInt();
        ^
Main.java:9: error: not a statement
    long int c = scan.nextInt();
    ^
Main.java:9: error: ';' expected
    long int c = scan.nextInt();
        ^
Main.java:10: error: not a statement
    long int d = scan.nextInt();
    ^
Main.java:10: error: ';' expected
    long int d = scan.nextInt();
        ^
Main.java:12: error: not a statement
    long long[] ans = new long long[4];
    ^
Main.java:12: error: ';' expected
    long long[] ans = new long long[4];
        ^
Main.java:12: error: '[' expected
    long long[] ans = new long long[4];
                              ^
Main.java:12: error: ']' expected
    long long[] ans = new long long[4];
                                    ^
Main.java:18: error: not a statement
    long int max = ans[0];
    ^
Main.java:18: error: ';' expected
    long int max = ans[0];
        ^
14 errors
Language: C++

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d;int p = INT_MAX;
    cin>>a>>b>>c>>d;
    for(int x =a;x<=b;x++)
    for(int y  = c;y<=d;y++)
    p = max (p,x*y);
    cout<<p;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'INT_MAX' was not declared in this scope
   15 |     int a,b,c,d;int p = INT_MAX;
      |                         ^~~~~~~
a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    9 | #include <iostream>
  +++ |+#include <climits>
   10 |
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
    long long a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<max(max(a*c,a*d),max(b*c,b*d))<<"\n";
}
投稿日時: 約 5 日前
最終更新: 約 1 日前

Compiler output:
a.cc:9:9: error: found ':' in nested-name-specifier, expected '::'
    9 | 投稿日時: 約 5 日前
      |         ^
      |         ::
a.cc:9:1: error: '\U00006295\U00007a3f\U000065e5\U00006642' does not name a type
    9 | 投稿日時: 約 5 日前
      | ^~~~~~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class ProdSum {
     public static void main(String[] args) {
         FastScanner fs=new FastScanner();
         int T=1;
         for (int tt=0; tt<T; tt++) {
                long a = fs.nextLong(),b = fs.nextLong(),c = fs.nextLong(),d = fs.nextLong();
                long ans;
                ans =       a*c;
                long ans1 = a*d;
                long ans2 = b*c;
                long ans3 = b*d;
                System.out.println(Math.max(ans,Math.max(ans1, Math.max(ans2, ans3))));     

}
}
 
 static class FastScanner {
     BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
     StringTokenizer st=new StringTokenizer("");
     String next() {
     while (!st.hasMoreTokens())
         try {
             st=new StringTokenizer(br.readLine());
         } catch (IOException e) {
             e.printStackTrace();
         }
         return st.nextToken();
     }
     
     int nextInt() {
         return Integer.parseInt(next());
     }
     int[] readArray(int n) {
         int[] a=new int[n];
         for (int i=0; i<n; i++) a[i]=nextInt();
         return a;
     }
     long nextLong() {
         return Long.parseLong(next());
     }
 }

 
}


Compiler output:
Main.java:8: error: class ProdSum is public, should be declared in a file named ProdSum.java
public class ProdSum {
       ^
1 error
Language: C++

#include <stdio.h>

/*
a <= x <= b
c <= y <= d
上記2式を制約として
x * yの最大値を返すプログラム

入力: 
　int a, b, c, d: 上記の制約に使用される変数(-10^9 ~ 10^9内の整数)
出力:
　各引数が指定の範囲内である場合: 上記の制約に満たすx * yの最大値
　各引数が指定の範囲外である場合: 0
*/
int main() {
	int max;
	int a, b, c, d;

	scanf_s("%d%d%d%d", &a, &b, &c, &d);

	max = a * c;
	max = (max < a * d) ? a * d : max;
	max = (max < b * c) ? b * c : max;
	max = (max < b * d) ? b * d : max;

	printf("%d", max);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   19 |         scanf_s("%d%d%d%d", &a, &b, &c, &d);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>

/*
a <= x <= b
c <= y <= d
上記2式を制約として
x * yの最大値を返すプログラム

入力: 
　int a, b, c, d: 上記の制約に使用される変数(-10^9 ~ 10^9内の整数)
出力:
　各引数が指定の範囲内である場合: 上記の制約に満たすx * yの最大値
　各引数が指定の範囲外である場合: 0
*/
main() {
	int max;
	int a, b, c, d;

	scanf_s("%d%d%d%d", &a, &b, &c, &d);

	max = a * c;
	max = (max < a * d) ? a * d : max;
	max = (max < b * c) ? b * c : max;
	max = (max < b * d) ? b * d : max;

	printf("%d", max);
}

Compiler output:
a.cc:15:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   15 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   19 |         scanf_s("%d%d%d%d", &a, &b, &c, &d);
      |         ^~~~~~~
      |         scanf
Language: C

#include<bits/stdc++.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
using namespace std;

int main(void){

  long long  a,b,c,d;
  cin>>a>>b>>c>>d;
  long long x1 = (a*c);
  long long x2 = (a*d);
  long long x3 = (b*c);
  long long x4 = (b*d);

  long long ans;
  ans = max(x1,x2);
  ans = max(ans,x3);
  ans = max(ans,x4);

  cout<<ans<<endl;
}


Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>

int main(){
	int a[4];
  	cin>>a[0]>>a[1]>>a[2]>>a[3];
  	sort(a, a+4);
  	cout<<a[3]*a[2];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>a[0]>>a[1]>>a[2]>>a[3];
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    6 |         sort(a, a+4);
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout<<a[3]*a[2];
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int64_t a,b,c,d;cin>>a>>b>>c>>d;
	int64_t ans1=b*d;int64_t ans2=b*d;
	int64_t x=b;ll y=d;
	int64_t ans3=a*c;
	if(ans3>ans1) cout<<ans3;
	else{
	while(x>a)
	{
		x--;
		ans1=max(ans1,x*d);                   // a<x<b; c<y<d
	}
	while(y>c)
	{
		y--;
		ans2=max(ans2,y*b);
	}
	cout<<max(ans1,ans2);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: no matching function for call to 'max(int64_t&, long long int)'
   20 |                 ans2=max(ans2,y*b);
      |                      ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:20:25: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   20 |                 ans2=max(ans2,y*b);
      |                      ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:20:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   20 |                 ans2=max(ans2,y*b);
      |                      ~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	ll a,b,c,d;cin>>a>>b>>c>>d;
	ll ans1=b*d;ll ans2=b*d;
	x=b;y=d;
	while(x>a)
	{
		x--;
		ans1=max(ans,x*d);                   // a<x<b; c<y<d
	}
	while(y>c)
	{
		y--;
		ans2=max(ans2,y*b);
	}
	cout<<max(ans1,ans2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'x' was not declared in this scope
    8 |         x=b;y=d;
      |         ^
a.cc:8:13: error: 'y' was not declared in this scope
    8 |         x=b;y=d;
      |             ^
a.cc:12:26: error: 'ans' was not declared in this scope; did you mean 'ans2'?
   12 |                 ans1=max(ans,x*d);                   // a<x<b; c<y<d
      |                          ^~~
      |                          ans2
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main()
{

ll a,b,c,d;
       cin>>a>>b>>c>>d;
       cout<<max({a*c,a*d,b*c,b*d});
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'll' was not declared in this scope
    7 | ll a,b,c,d;
      | ^~
a.cc:8:13: error: 'a' was not declared in this scope
    8 |        cin>>a>>b>>c>>d;
      |             ^
a.cc:8:16: error: 'b' was not declared in this scope
    8 |        cin>>a>>b>>c>>d;
      |                ^
a.cc:8:19: error: 'c' was not declared in this scope
    8 |        cin>>a>>b>>c>>d;
      |                   ^
a.cc:8:22: error: 'd' was not declared in this scope
    8 |        cin>>a>>b>>c>>d;
      |                      ^
a.cc:9:17: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |        cout<<max({a*c,a*d,b*c,b*d});
      |              ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C

#include<stdio.h>
#include<math.h>
 
int main()
{
  int a,b,c,d;
  scanf("%d %d %d %d",&a,&b,&c,&d);
  printf("%d",max(a*c,a*d,b*c,b*d));
}

Compiler output:
main.c: In function 'main':
main.c:8:15: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
    8 |   printf("%d",max(a*c,a*d,b*c,b*d));
      |               ^~~
      |               fmax
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
  int a,b,c,d;
  scanf("%d %d %d %d",&a,&b,&c,&d);
  printf("%d",max(a*c,a*d,b*c,b*d))
}

Compiler output:
main.c: In function 'main':
main.c:8:15: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
    8 |   printf("%d",max(a*c,a*d,b*c,b*d))
      |               ^~~
      |               fmax
main.c:8:36: error: expected ';' before '}' token
    8 |   printf("%d",max(a*c,a*d,b*c,b*d))
      |                                    ^
      |                                    ;
    9 | }
      | ~
Language: C++

include<bits/stdc++.h>
using namespace std;
main()
{ long long int a,b,c,d,x,y;
   cin>>a>>b>>c>>d;
//    x=a;
//    x=d;
//    y=c;y=b;
//    if(a>=-1000000000 && a<=x && x<=b && b<=1000000000 || c<=y && c>=-1000000000&& y<=d && d<=1000000000)
//        cout<<x*y;
 //else cout<<x*y;
 
 x=max(max(a*c,a*d),max(b*c,b*d));
cout<<x<<endl;

}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope
    5 |    cin>>a>>b>>c>>d;
      |    ^~~
a.cc:13:8: error: 'max' was not declared in this scope
   13 |  x=max(max(a*c,a*d),max(b*c,b*d));
      |        ^~~
a.cc:13:4: error: 'max' was not declared in this scope
   13 |  x=max(max(a*c,a*d),max(b*c,b*d));
      |    ^~~
a.cc:14:1: error: 'cout' was not declared in this scope
   14 | cout<<x<<endl;
      | ^~~~
a.cc:14:10: error: 'endl' was not declared in this scope
   14 | cout<<x<<endl;
      |          ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
ll mod=1e9+7;
ll func(vector<ll> &a,ll n) 
{
    ll sum = 0;  
    for(ll i=0;i<n;i++) sum+=a[i]; 
    bool dp[n+1][sum+1];  
    for(ll i=0;i<=n;i++) dp[i][0]=true; 
    for(ll i=1;i<=sum;i++) dp[0][i]=false; 
    for(ll i=1; i<=n; i++) 
    { 
        for(ll j=1;j<=sum;j++) 
        {
            dp[i][j]=dp[i-1][j]; 
            if(a[i-1]<=j) dp[i][j] |= dp[i-1][j-a[i-1]]; 
        } 
    } 
    ll ans=LLONG_MAX;
    for(ll j=sum/2;j>=0;j--) 
    {  
        if(dp[n][j]) 
        { 
            ans=sum-2*j; 
            break; 
        } 
    } 
    return ans; 
}
int main()
{
    io
    ll a,b,c,d;
    cin>>a>>b>>c>>d
    ll k1,k2,k3,k4;
    k1=a*c;
    k2=a*d;
    k3=b*c;
    k4=b*d;
    ll ans=max(k1,max(k2,max(k3,k4)));
    cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:20: error: expected ';' before 'long'
   36 |     cin>>a>>b>>c>>d
      |                    ^
      |                    ;
a.cc:38:5: error: 'k1' was not declared in this scope; did you mean 'y1'?
   38 |     k1=a*c;
      |     ^~
      |     y1
a.cc:39:5: error: 'k2' was not declared in this scope
   39 |     k2=a*d;
      |     ^~
a.cc:40:5: error: 'k3' was not declared in this scope
   40 |     k3=b*c;
      |     ^~
a.cc:41:5: error: 'k4' was not declared in this scope
   41 |     k4=b*d;
      |     ^~
Language: C++

include<bits/stdc++.h>
using namespace std;
main()
{ long long int a,b,c,d,x,y;
   cin>>a>>b>>c>>d;
//    x=a;
//    x=d;
//    y=c;y=b;
//    if(a>=-1000000000 && a<=x && x<=b && b<=1000000000 || c<=y && c>=-1000000000&& y<=d && d<=1000000000)
//        cout<<x*y;
 //else cout<<x*y;
 cout<<max(max(a*c,a*d),max(b*c,b*d))<<endl;

}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope
    5 |    cin>>a>>b>>c>>d;
      |    ^~~
a.cc:12:2: error: 'cout' was not declared in this scope
   12 |  cout<<max(max(a*c,a*d),max(b*c,b*d))<<endl;
      |  ^~~~
a.cc:12:12: error: 'max' was not declared in this scope
   12 |  cout<<max(max(a*c,a*d),max(b*c,b*d))<<endl;
      |            ^~~
a.cc:12:8: error: 'max' was not declared in this scope
   12 |  cout<<max(max(a*c,a*d),max(b*c,b*d))<<endl;
      |        ^~~
a.cc:12:40: error: 'endl' was not declared in this scope
   12 |  cout<<max(max(a*c,a*d),max(b*c,b*d))<<endl;
      |                                        ^~~~
Language: C

#include<stdio.h>
int main()
  {
  int a,b,c,d,s=1,x,y,f;
  scanf("%d%d%d%d",&a,&b,&c,&d);
  x=a;
  y=c;
  s=x*y;
  y=d;
  f=x*y;
  if(f>s)
    s=f;
  
  x=b;
  y=c;
  f=x*y;
  if(f>s)
    s=f;
  
  y=d;
  f=x*y;
  if(f>s)
    s=f;
  
  printf("%d/n",s);
  
  return 0;
  
  
  

Compiler output:
main.c: In function 'main':
main.c:27:3: error: expected declaration or statement at end of input
   27 |   return 0;
      |   ^~~~~~
Language: C++



	#include<bits/stdc++.h>
	#include<ext/pb_ds/assoc_container.hpp>
	#include<ext/pb_ds/tree_policy.hpp>
	#define int long long
	#define w(t) int t;cin>>t;while(t--)
	#define pb push_back
	#define mk make_pair
	#define ascSort(v) sort(v.begin(), v.end())
	#define descSort(v) sort(v.begin(), v.end(), greater<int>())
	#define ff first
	#define ss second
	#define pi pair<int,int>
	#define vi vector<int>
	#define umapi unordered_map<int,int>

	const int m=998244353;
	using namespace std;
	using namespace __gnu_pbds;

	typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>PBDS;

	void FIO(){
		#ifndef ONLINE_JUDGE
			freopen("input.txt", "r", stdin);
			freopen("output.txt", "w", stdout);
		#endif
		ios_base::sync_with_stdio(false);
	    cin.tie(NULL);	
	}

	int32_t main(){
		
		//FIO();
		
			int a,b,c,d;cin>>a>>b>>c>>d;
			cout<<amx(b*d,a*c);
				
		

        		
		return 0;
		
			
	}



		
		

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:38:31: error: 'amx' was not declared in this scope
   38 |                         cout<<amx(b*d,a*c);
      |                               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c,d,x,y,z,w;
  cin>>a>>b>>c>>d;
  x=a*c;
  y=b*d;
  z=a*d;
  w=b*c;
  cout<<max(x,y,z,w);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: no matching function for call to 'max(int&, int&, int&, int&)'
   11 |   cout<<max(x,y,z,w);
      |         ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 4 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 4 provided
Language: Java

import java.util.*;
import java.io.*;
import java.util.Arrays;
public class Test {

	public static void main (String [] args) throws IOException

	{
		Scanner s=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int a=s.nextInt(),b=s.nextInt(),c=s.nextInt(),d=s.nextInt();
		long max=Long.MIN_VALUE;
		int x=Math.max(a,b);
		long y=Math.max(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);

		x=Math.min(a,b);
		y=Math.max(c,d);
		max=Math.max(max,x*y);


		x=Math.max(a,b);
		y=Math.min(c,d);
		max=Math.max(max,x*y);
		pw.println(max);


		pw.flush();

}


















	public static void shuffle(int[] a)
	{
		int n = a.length;
		for(int i = 0; i < n; i++)
		{
			int r = i + (int)(Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

	/*

	 try {
		    Thread.sleep(2000);
		} catch(InterruptedException ex) {
		    Thread.currentThread().interrupt();
		}

	 */



	static class Scanner
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

	public String next() throws IOException
	{
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {return Integer.parseInt(next());}

	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}

	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}

	public boolean ready() throws IOException {return br.ready();}


}
}

Compiler output:
Main.java:4: error: class Test is public, should be declared in a file named Test.java
public class Test {
       ^
1 error
Language: C++

#include<iostream>
using namespace std;

int main()
{
 long long int a,b,c,d,r;
cin>>a>>b>>c>>d;  
  if(b>=0&&d>=0)
    r=b*d;
    else if(b<=0&&d<=0)
    r=a*c;
 else if(b<=0&&d=>0)
 r=b*c;
else if(b>0&&d<0)
   r=a*d;
  else if(b==0||d==0)
    r=0;
  cout<<r<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected primary-expression before '>' token
   12 |  else if(b<=0&&d=>0)
      |                  ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main(){
    long a, b, c, d;
    cin>>a>>b>>c>>d;

    long ans1, ans2, ansfinal;

    ans1=max(a*c, a*d);
    ans2=max(b*c, b*d);

    ansfinal=max(ans1, ans2);

    cout<<ansfinal<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: expected '}' at end of input
   18 |     cout<<ansfinal<<endl;
      |                          ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
 long long int a,b,c,d,r;
cin>>a>>b>>c>>d;  
  if((b>=0&&d>=0)||(b<0&&d<0))
    r=b*d;
 else if(b<0&&d>0)
 r=b*c;
else if(b>0&&d<0))
   r=a*d;
  else if(b==0||d==0)
    r=0;
  cout<<r<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected primary-expression before ')' token
   12 | else if(b>0&&d<0))
      |                  ^
Language: C++

#include<stdio.h>
#include<iostream>

using namespace std;

int main()
{
    long long a, b, c, d;
    long long x, y;
    cin >> a >> b >> c >> d;
    if (b > 0 && d > 0) {
        if (b == 0 && d == 0) {
            x = a;
            y = c;
        }
        else {
            x = b;
            y = d;
        }
    }
    else if (b < 0 && d < 0) {
        x = a;
        y = c;
    }
    else if(b<0 || d<0){
        if (b < 0) {
            x = b;
            y = c;
        }
        else {
            x = a;
            y = d;
        }
    }
    else if (b==0 && d==0) {
        x = 0;
        y = 0;
    }
    else if(b==0 || d==0)
        if (a < 0 && c < 0) {
            x = a;
            y = c;
        }
        else {
            x = b;
            y = d;
        }
    }
    cout << x * y;

}

Compiler output:
a.cc:49:5: error: 'cout' does not name a type
   49 |     cout << x * y;
      |     ^~~~
a.cc:51:1: error: expected declaration before '}' token
   51 | }
      | ^