#46140: C++ set


1121228@stu.wghs.tp.edu.tw (你知道我是誰嗎!!??)


#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, tmp;
    set<int> amount;
    cin >> n;
    for(int i=0; i<n; i++){
        cin >> tmp;
        amount.insert(tmp);
    }
    cout << *amount.rbegin();
    return 0;
}