现在的位置: 首页 > 综合 > 正文

HDU-1040(水题)

2013年08月27日 ⁄ 综合 ⁄ 共 439字 ⁄ 字号 评论关闭

真不知道该怎么办,这几天我都快累死了,,,一点学习的劲头都没有,,很想扎进去学习,,可真的是力不从心,,都沦落到做水题了,,悲哀...

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;



__int64 a[1111];

__int64 cmp(const void *a,const void *b)
{
	return *(__int64 *)a-*(__int64 *)b;
}


int main()
{
	int T;
	scanf("%d",&T);
	while(T--)
	{
		int M;
		scanf("%d",&M);
		for(int i=0;i<M;i++)
		{
			scanf("%I64d",&a[i]);
		}
		sort(a,a+M);
		for(i=0;i<M;i++)
		{
			printf(i==M-1?"%I64d\n":"%I64d ",a[i]);
		}
	}
	return  0;
}

 

抱歉!评论已关闭.