# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
21099 | yunhoo90 | 최댓값 (tutorial2) | C++11 | 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 <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <list>
#include <memory.h>
using namespace std;
int GetMax(int N, int A[]) {
int m = -987654321;
for (int i = 0; i < N; i++) {
m = max(A[i], m);
}
return m;
}
int main() {
int n, a[10];
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
cout << GetMax(n, a)<<endl;
return 0;
}