mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2025-01-23 13:11:59 +00:00
B - Climbing Takahashi
https://atcoder.jp/contests/abc235/submissions/28536973
This commit is contained in:
parent
688f92f284
commit
20c8c20afb
21
AtCoder/ABC235/B/B.cpp
Normal file
21
AtCoder/ABC235/B/B.cpp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user