HDOJ 1029 Ignatius and the Princess IV
来源:互联网 发布:underscore.js 使用 编辑:程序博客网 时间:2024/04/30 19:25
原题链接
快排后取中间那个数。
附ac代码:
#include <stdio.h>#include <stdlib.h>int cmp(const void *a, const void *b){return *(int *)a - *(int *)b;}int main(){int n, *a, i;while(scanf("%d", &n) == 1){i = n;a = (int *)malloc(sizeof(int) *n);while(i--)scanf("%d", &a[i]);qsort(a, n, sizeof(int), cmp);printf("%d\n", a[n / 2]);free(a);}return 0;}
0 0
- 【HDOJ】1029 -> Ignatius and the Princess IV
- hdoj 1029 Ignatius and the Princess IV
- HDOJ 1029 Ignatius and the Princess IV
- HDOJ Ignatius and the Princess IV 1029
- HDOJ 1029 Ignatius and the Princess IV
- hdoj 1029 Ignatius and the Princess IV
- HDOJ 1029 Ignatius and the Princess IV
- hdoj-1029-Ignatius and the Princess IV
- hdoj 1029 Ignatius and the Princess IV
- HDOJ 1029 Ignatius and the Princess IV
- HDOJ 1029 Ignatius and the Princess IV [map]
- HDOJ 1029:Ignatius and the Princess IV 解题报告
- hdoj.1029 Ignatius and the Princess IV 20140809
- HDOJ 1029 Ignatius and the Princess IV 【math】
- hdoj 1029 Ignatius and the Princess IV 【简单】
- HDOJ 1029 Ignatius and the Princess IV (水题)
- HDOJ 1029 Ignatius and the Princess IV(易题)
- 杭电HDOJ 1029 Ignatius and the Princess IV
- C++ Primer总结与内容拓展(第四章)
- 特别提醒:iOS7适配坐标问题
- Qt Error: "max"宏的实参不足
- android 自带Style 属性
- Android中Theme和Style的使用
- HDOJ 1029 Ignatius and the Princess IV
- 关于android布局的两个属性dither和tileMode
- 浅谈android的selector,背景选择器
- HTML5论坛——PhoneJS移动开发框架
- c语言中如何精确判断bool float是否等于零?
- android shape的使用
- Activity生命周期图
- DOS系统功能调用表(INT 21H)
- vc++ 如何创建并引入静态库 .lib