Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

冒泡排序

Posted by liach at 2016-12-29 16:02:20 on Problem 2869
这题目实际上比较水,冒泡排序就可以了
{1 -> 3, 2 -> 5, 3 -> 4, 4 -> 1, 5 -> 2}
把这个转换成
{1 <- 4, 2 <- 5, 3 <- 1, 4 <- 3, 5 <- 2}
把数组{4, 5, 1, 3, 2}冒泡排序一遍,再将顺序逆向输出即可~~
5 3 5 4 1 2
这个数据的最简答案是
7 2 3 4 2 3 1 2

可惜简单题目没人做啊

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator