Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
指针访问数组元素2
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 232, Accepted users: 228
Problem 10482 : No special judgement
Problem description
  编写一个冒泡排序算法,使用指针将n个整型数据按从小到大的顺序进行排序。

Input
  第一行是一个整数T,表示有T组数据。每组数据第一个数为n,表示这组数据有n个数,后面紧接着是n个数,数之间用空格分隔。

Output
  对于每一组数据,先输出“Case #:”(#为序号,从1起),换行;然后输出排序后的结果,换行;数据之间均用一个空格分隔,每行最后一个数据后面无空格。

Sample Input
2
5 4 5 8 1 7
10 41 67 34 0 69 24 78 58 62 64
Sample Output
Case 1:
1 4 5 7 8
Case 2:
0 24 34 41 58 62 64 67 69 78
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2241 today,16258968 total, since 2010-05-07