# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3155 | chan492811 | 최댓값 (tutorial2) | C++98 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <cstdio>
using namespace std;
int n,s,m;
void gm(int q,int w)
{
if(q>=w)m=q;
else m=w;
return;
}
int main()
{
int i;
scanf("%d",&n);
scanf("%d",&s);
m=s;
for(i=2;i<=n;i++)
{
scanf("%d",&s);
gm(m,s);
}
printf("%d",m);
return 0;
}