- P57's solution
-
题解 P57
- @ 2025-10-24 18:23:08
按题意,即求出所有高度的最大值,可以直接使用 函数。
AC code:
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int max_height = 0;
for (int i = 1; i <= x; i++) {
int a;
cin >> a;
max_height = max(max_height, a);
}
cout << max_height << endl;
return 0;
}