HDOJ 1157
来源:互联网 发布:qq网页链接打开淘宝app 编辑:程序博客网 时间:2024/06/16 03:14
一道水的题目,不过自己的缺陷还是有蛮多~
以前已经仅仅是看过C标准库的qsort和C++的sort,没有用上,很遗憾~明天要找一道题目练习一下~
#include "stdio.h"int main(int argc, char* argv[]){int N,i,j,temp;int output[10000];while(scanf("%d",&N)!=EOF){for(i=0;i<N;i++){scanf("%d",&output[i]);}for(i=0;i<N-1;i++)for(j=i+1;j<N;j++){if(output[j]>output[i]){temp=output[j];output[j]=output[i];output[i]=temp;}}printf("%d\n",output[(N+1)/2-1]);}return 0;}
- HDOJ 1157
- HDOJ
- hdoj
- hdoj
- HDOJ
- hdoj 1157 Who's in the Middle
- HDOJ 1157 Who's in the Middle
- hdoj 1568 && hdoj 5344 && hdoj 5444
- [HDOJ 1157] Who's in the Middle (基础题)
- hdoj.1157 Who's in the Middle 20140811
- HDOJ 1157 Who's in the Middle(水)
- hdoj 1157 Who's in the Middle(心机水题)
- HDOJ 2176
- Hdoj--1272
- hdoj 1003
- hdoj 1005
- hdoj 1030
- hdoj 2154
- 基于windows IIS的C语言CGI WEB服务器环境搭建
- Lua消息处理入门
- 括号匹配
- 菜鸟也学Ogre-超级打地鼠
- 进程间通信
- HDOJ 1157
- #pragma data_seg() 在进程通信,数据共享上的用法总结
- 一个很不错的lua学习实例
- 程序员需要具备的基本技能
- 如何在CEGUI中使用Lua脚本入门学习
- 数据库学习之ADO模型
- poj1459 Power Network网络流最大流基础题
- SQL索引实例(7个不同类型)
- CTCLAS分词系统研究(一)