#include<iostream>
#define l long long int
using namespace std;
l anik(l a[], l s)
{
static int i = 0;
static int m = -100;
if(i == s-1)
{
if(m<a[i])
m = a[i];
return m;
}
else
{
if(m<a[i])
m = a[i];
i++;
anik(a, s);
}
}
int main()
{
l i, n, x;
cin >> n;
l b[n];
for(i=0;i<n;i++)
{
cin >> b[i];
}
x = anik(b, n);
cout << x << endl;
return 0;
}
#define l long long int
using namespace std;
l anik(l a[], l s)
{
static int i = 0;
static int m = -100;
if(i == s-1)
{
if(m<a[i])
m = a[i];
return m;
}
else
{
if(m<a[i])
m = a[i];
i++;
anik(a, s);
}
}
int main()
{
l i, n, x;
cin >> n;
l b[n];
for(i=0;i<n;i++)
{
cin >> b[i];
}
x = anik(b, n);
cout << x << endl;
return 0;
}
Comments
Post a Comment