Cod sursa(job #2989460)
Utilizator | Data | 6 martie 2023 17:55:29 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <iostream>
#include <climits>
using namespace std;
int Read() {
int x;
cin >> x;
return x;
}
void maxSelf(int &x, int y) {
if(y > x) {
x = y;
}
}
int n = Read(), a, mx = INT_MIN;
int main()
{
if(n == 0) {
cout << mx << '\n';
return 0;
} else {
n--;
a = Read();
maxSelf(mx, a);
return main();
}
}