1 #include<stdio.h>
 2 #include<string.h>
 3 #include<stdlib.h>
 4 int cmp(const void *a,const void *b)
 5 {
 6     return *(int *)a-*(int *)b;
 7 }
 8 int main()
 9 {
10     int t,m,n,i;
11     int a[11000];
12     scanf("%d",&t);
13     while(t--)
14     {
15         scanf("%d",&m);
16         memset(a,0,sizeof(a));
17         for(i=0;i<m;i++)
18         scanf("%d",a+i);
19         qsort(a,m,sizeof(a[0]),cmp);
20         printf("%d\n",a[(m-1)/2]);
21     }
22     //system("pause");
23     return 0;
24 }

相关文章:

  • 2022-12-23
  • 2021-05-17
  • 2021-10-11
  • 2022-12-23
  • 2021-12-04
  • 2021-12-17
  • 2021-12-01
  • 2021-08-28
猜你喜欢
  • 2021-06-25
  • 2021-08-12
  • 2022-01-21
  • 2022-01-16
  • 2021-12-06
  • 2022-12-23
相关资源
相似解决方案