Problem P
题意:FJ养牛,他想知道中间的牛是那一头;
思路:这道题有点水,思路就不写了
#include
#include
#include
#define maxn 10005
using namespace std;
bool comp(int a,int b)
{
return
a
}
int ans[maxn];
int main()
{
//freopen("in.txt", "r", stdin);
int n;
while(scanf("%d",&n)!=EOF)
{
for(int i=0;i
{
scanf("%d",&ans[i]);
}
sort(ans,ans+n,comp);
printf("%d\n",ans[n/2]);
}
return
0;
}
#include
#include
#define maxn 10005
using namespace std;
bool comp(int a,int b)
{
}
int ans[maxn];
int main()
{
}
我每天都在努力,只是想证明我是认真的活着.