zoukankan      html  css  js  c++  java
  • HDU 1029: Ignatius and the Princess IV

    5
    1 3 2 3 3
    11
    1 1 1 1 1 5 5 5 5 5 5
    7
    1 1 1 1 1 1 1

    3

    5

    1

    #include <stdio.h>
    #include <stdlib.h>
    int cmp(const void *a,const void *b){
        return *(int*)a-*(int*)b;//(从小到大)
    }
    int nums[1000000];
    int main(){
        int n;
        while(scanf("%d",&n)!=EOF){
            for(int i=0;i<n;i++)scanf("%d",&nums[i]);
            qsort(nums,n,sizeof(int),cmp);
            printf("%d
    ",nums[n/2]);
        }
        return 0;
    }
    View Code
  • 相关阅读:
    nVelocity .NET的模板引擎(template engine) 转载
    NewWords/700800
    美剧字幕杀手之王第1季 第1集
    美剧字幕傲骨贤妻第1季 第1集
    NewWords/9001000
    示例代码控制设备背景代码
    算法把图像压缩成指定大小的代码
    获取和设置 iphone 屏幕亮度
    美剧字幕傲骨贤妻第1季 第2集
    NewWords/600700
  • 原文地址:https://www.cnblogs.com/Rhythm-/p/9322665.html
Copyright © 2011-2022 走看看