基本思想:
无;
关键点:
无;
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> #include<set> #include<map> using namespace std; const int maxn = 10010; int ma[maxn]; int main() { int n; while (cin>>n){ for (int i = 0; i < n; i++) { cin >> ma[i]; } sort(ma, ma + n); cout << ma[n - 1] << " " << ma[0] << endl; } return 0; }
原文地址:https://www.cnblogs.com/songlinxuan/p/12394783.html
时间: 2024-11-06 04:54:56