hdu-1040-As Easy As A+B
1 /* 2 Name:hdu-1040-As Easy As A+B 3 Copyright: 4 Author: 5 Date: 2018/4/25 10:40:48 6 Description:water 7 */ 8 #include <iostream> 9 #include <cstdio> 10 #include <algorithm> 11 using namespace std; 12 int main() 13 { 14 // freopen("in.txt", "r", stdin); 15 int n; 16 cin>>n; 17 int nums[1005]; 18 while (n--) { 19 int t; 20 cin>>t; 21 for (int i=0; i<t; i++) { 22 scanf("%d", &nums[i]); 23 } 24 sort(nums, nums + t); 25 cout<<nums[0]; 26 for (int i=1; i<t; i++) { 27 printf(" %d", nums[i]); 28 } 29 cout<<endl; 30 } 31 return 0; 32 }