mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-27 12:31:58 +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;
|
||
|
}
|