mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-14 02:58:47 +00:00
22 lines
306 B
C++
22 lines
306 B
C++
|
#include <iostream>
|
||
|
|
||
|
using std::cin;
|
||
|
using std::cout;
|
||
|
using std::endl;
|
||
|
|
||
|
int n, h, ans;
|
||
|
|
||
|
int main() {
|
||
|
cin >> n;
|
||
|
for (int i = 1; i <= n; i++) {
|
||
|
cin >> h;
|
||
|
if (h <= ans) {
|
||
|
break;
|
||
|
} else {
|
||
|
ans = h;
|
||
|
}
|
||
|
}
|
||
|
cout << ans << endl;
|
||
|
return 0;
|
||
|
}
|