网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  HDU 1157 Who's in the Middle

HDU 1157 Who's in the Middle

分类: IT文章 • 2023-11-03 20:15:43
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        int a[100000];
        for(int i=0; i<n; i++)
        scanf("%d",&a[i]);
        sort(a,a+n);
        printf("%d
",a[n/2]);
    }
    return 0;
}

相关推荐

  • poj 2388 Who's in the Middle(快速排序求中位数)
  • poj 2388 Who's in the Middle(快速排序求中位数)
  • HDU 1157 Who's in the Middle (快速排序 or 随便排序)
  • HDU 1157 Who's in the Middle
  • BZOJ1753 [Usaco2005 qua]Who's in the Middle
  • Poj 2388 Who's in the Middle
  • POJ 2388 Who's in the Middle(水~奇数个数排序求中位数)
  • HDU 4633 Who's Aunt Zhang (Polya定理+快速幂)
  • 2016huas暑假集训训练题 G-Who's in the Middle
  • POJ 2388 -- Who's in the Middle
  • Reverse Integer
  • PAT (Advanced Level) 1003. Emergency (25)
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号