poj 2388 insert sorting
来源:互联网 发布:云计算运维和售前 编辑:程序博客网 时间:2024/05/10 02:15
/** \brief poj 2388 insert sorting 2015 6 12 * * \param * \param * \return * */#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int N=10000;int Arr[N];void insertSort(int len){ for(int j=1;j<len;j++) { int key=Arr[j]; int i=j-1; while(i>=0 && Arr[i]>key) { Arr[i+1]=Arr[i]; i=i-1; } Arr[i+1]=key; }}int main(){ //cout << "Hello world!" << endl; int n; scanf("%d",&n); //while(scanf("%d",&n)) //{ memset(Arr,0,sizeof(Arr)); for(int i=0;i<n;i++) //scanf("%d",Arr[i]); cin>>Arr[i]; insertSort(n); cout<<Arr[n/2]<<endl; //} return 0;}
0 0
- poj 2388 insert sorting
- insert-sorting
- insert sorting
- sorting - insert sort
- POJ 1007 DNA Sorting
- poj 1007 DNA Sorting
- poj 3270 Cow Sorting
- POJ 1007 DNA Sorting
- POJ-1007 DNA Sorting
- 【POJ】1007 DNA Sorting
- POJ-1007:DNA Sorting
- poj 1007 DNA Sorting
- POJ Cow Sorting 置换
- POJ 1007 DNA Sorting
- POJ 1007 DNA Sorting
- poj 1007 DNA Sorting
- POJ-1486-Sorting Slides
- POJ 1007 DNA Sorting
- phpstorm 【这里图片演示的是phpstorm】 webstorm 实现 项目上传到github
- 恭贺自己itpub和csdn双双获得专家博客称号
- linux内存之free used buffer cach
- json入门教程+在java中的一些便捷操作
- iOS学习笔记之QuartzCore框架
- poj 2388 insert sorting
- 剧场版复活的f 剧情
- 安卓服务——bind service一个绑定式的服务
- 6、linux ad7879触摸屏驱动
- android压力测试命令monkey详解
- monkeyrunner 环境配置
- 在spring MVC的controller中获取ServletConfig
- unity 奇葩错误报错 nternal compiler error. See the console log for... 然后所有的代码都报 The associated script can
- Oracle行转列、列转行的Sql语句总结