From 20c8c20afbafe27947c7ddea4892a8947a9ba8cb Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 15 Jan 2022 20:09:23 +0800 Subject: [PATCH] B - Climbing Takahashi https://atcoder.jp/contests/abc235/submissions/28536973 --- AtCoder/ABC235/B/B.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 AtCoder/ABC235/B/B.cpp diff --git a/AtCoder/ABC235/B/B.cpp b/AtCoder/ABC235/B/B.cpp new file mode 100644 index 00000000..e37c0179 --- /dev/null +++ b/AtCoder/ABC235/B/B.cpp @@ -0,0 +1,21 @@ +#include + +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; +}