foo.cc: In function 'int main()':
foo.cc:4:30: error: 'INT_MIN' was not declared in this scope
4 | int n,left,right,max=INT_MIN,maxi,x;
| ^~~~~~~
foo.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
1 | #include<iostream>
+++ |+#include <climits>
2 | using namespace std;
foo.cc:7:22: error: 'x' was not declared in this scope
7 | cin>>x;
| ^
foo.cc:9:31: error: 'maxi' was not declared in this scope; did you mean 'max'?
9 | max=x,maxi=i;
| ^~~~
| max
foo.cc:11:12: error: 'maxi' was not declared in this scope; did you mean 'max'?
11 | if(maxi==0||maxi==n-1||n%2==0)
| ^~~~
| max
foo.cc:4:15: warning: unused variable 'left' [-Wunused-variable]
4 | int n,left,right,max=INT_MIN,maxi,x;
| ^~~~
foo.cc:4:20: warning: unused variable 'right' [-Wunused-variable]
4 | int n,left,right,max=INT_MIN,maxi,x;
| ^~~~~
[Hydro](https://hydro.ac)提供评测服务