题意: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;
   
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-11-10
  • 2022-12-23
猜你喜欢
  • 2022-01-24
  • 2022-12-23
  • 2022-02-06
  • 2021-06-19
  • 2021-11-03
  • 2021-08-11
相关资源
相似解决方案