Scanner s=new Scanner(System.in);
int n=s.nextInt();
int[] arr=new int[n];
for(int i=0;i<n;i++){
arr[i]=s.nextInt();
}
int lo=0;
int hi=n-1;
int areamax=0;
while(lo<=hi){
int area=0;
area=Math.min(arr[lo],arr[hi])*(hi-lo);
if(arr[lo]<arr[hi]){
lo++;
}
else{
hi--;
}
if(area>areamax){
areamax=area;
}
}
System.out.print(areamax);
This is getting accepted and is being submitted .But when I compile it,Complier is not working.Is there some problem in my code or there is some issue in hackerblocks.