#include<bits/stdc++.h>
using namespace std;
int main() {
int N,arr[N];
cin>>N;
for(int i=0;i<=N;i++)
{
cin>>arr[i];
if(arr[0]<arr[i])
{
arr[0]=arr[i];
}
}
cout<<arr[0];
/*int max=0;
max=INT_MIN;
cout<<max;
return 0;
*/
}
One test case not matching
Use for(int i=0;i<N;i++), instead wht you have used, and then try to submit the code…