HUST Online Judge WebBoard
Problem 1370 >> 即输出最大值
20234170107 @ 2023-11-28 09:26:20
[ Quote ] [ Edit ] [ Delete ] 1#
#include<bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false), cin.tie(0),cout.tie(0);
int n;
cin >> n;
vector<int> a(n);
for (int u = 0; u < n; u++) {
cin >> a[u];
}
sort(a.begin(), a.end());
cout << a[a.size()-1] << endl;
return 0;
}