#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
using ll = long long;
void GordenGhost();
signed main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
GordenGhost();
return 0;
}
void GordenGhost(){
ll n;
cin>>n;
map<ll,ll>mp;
ll mi=1e9,ma=-1;
for (int i=0;i<n;i++){
ll a;
cin>>a;
mp[a]++;
ma=max(ma,a);
mi=min(mi,a);
}
cout<<mi<<' '<<mp[mi]<<endl;
cout<<ma<<' '<<mp[ma];
}
天梯赛的善良(团体程序设计天梯赛-练习集L1-079)
最新推荐文章于 2024-08-22 17:27:46 发布