我实在是太懒了,水过吧
#include<iostream> #include<algorithm> using namespace std; const int MAXN = 1E4; int a[MAXN+1]; int main() { int N; cin>>N; for(int i = 0;i<N;i++) cin>>a[i]; sort(a,a+N); cout<<a[N/2]<<endl; }
原文地址:https://www.cnblogs.com/ZZUGPY/p/8476308.html
时间: 2024-10-25 05:21:14