時間限制: 3 s
空間限制: 128000 kb
題目等級 : ** gold
description
給定n(n≤500,000)和n個整數(較有序),將其排序後輸出。
輸入描述
input description
n和n個整數
輸出描述
output description
n個整數(公升序)
樣例輸入
sample input
12 11 10 8 9
樣例輸出
sample output
8 9 10 11 12
資料範圍及提示
data size & hint
對於33%的資料 n≤10000
對於另外33%的資料 n≤100,000 0≤每個數≤1000
對於100%的資料 n≤500,000 0≤每個數≤2*10^9
分類標籤 tags 點此展開
1 #include2 #include3using
namespace
std;
4long
long
int a[1000001];5
intmain()614
int m=n;
15for(int i=1;i<=n;i++)
1622
return0;
23 }
3110 二叉堆練習3
時間限制 3 s 空間限制 128000 kb 題目等級 gold 題解檢視執行結果 給定n n 500,000 和n個整數 較有序 將其排序後輸出。輸入描述 input description n和n個整數 輸出描述 output description n個整數 公升序 樣例輸入 sample ...
codevs 3110 二叉堆練習3
時間限制 3 s 空間限制 128000 kb 題目等級 gold 給定n n 500,000 和n個整數 較有序 將其排序後輸出。輸入描述 input description n和n個整數 輸出描述 output description n個整數 公升序 樣例輸入 sample input 12 ...
codevs 3110 二叉堆練習3
時間限制 3 s 空間限制 128000 kb 題目等級 gold 題目描述 description 給定n n 500,000 和n個整數 較有序 將其排序後輸出。輸入描述 input description n和n個整數 輸出描述 output description n個整數 公升序 樣例輸入...