poj 2388 排序的水题
生活随笔
收集整理的這篇文章主要介紹了
poj 2388 排序的水题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?? 純純的水題。
#include <iostream> #include <fstream> #include <cstdlib>using namespace std; int a[1000005];int cmp(const void*a,const void*b) {return *(int*)a-*(int*)b; } int main() {int n,i;freopen("acm.txt","r",stdin);scanf("%d",&n);for(i=0; i<n; i++)scanf("%d",&a[i]);qsort(a,n,sizeof(int),cmp);printf("%d\n",a[n/2]);return 0; }?
轉載于:https://www.cnblogs.com/Jason-Damon/archive/2012/04/13/2446403.html
總結
以上是生活随笔為你收集整理的poj 2388 排序的水题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 关于禁止程序重复启动的另一种需要与实现《
- 下一篇: 《Netty权威指南》