Rita li

You give me a future, I love you the whole once

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
	int n;
	int buff[10000];
	while(scanf("%d",&n)!=EOF)
	{
		for(int i=0;i<n;i++)
		{
			scanf("%d",&buff[i]);
		}
		sort(buff,buff+n);//调用C++的快速排序库函数
		for(i=0;i<n;i++)
			printf("%d ",buff[i]);
	}
	printf("\n");

	return 0;
}

  

posted on 2014-03-30 19:17  Rita li  阅读(284)  评论(0编辑  收藏  举报