# C++每日一题 Day 8 蒙德最强战力

***

lhy版权所有，禁止转载

### 知识点：冒泡排序/选择排序

***

## 题目描述

众所周知，每个蒙德居民对每个守护蒙德的人的战斗力都有自己的标尺。对派蒙而言，她的战斗力单位是野猪，而她的战力值是1/5野猪。派蒙希望得到一张蒙德战力排名，想看看荧能排到第几。于是荧和派蒙找到了琴团长，琴团长却说蒙德没有这样的排名。荧和派蒙只好偷偷窥视每一个可能上榜的人，记录下ta的战斗力。

下面给出她们记录下的战力表，请你进行排序并输出排序好的蒙德战力排行（从强到弱，战力单位：野猪）

## 输入

第一行为一个整数n，表示荧和派蒙记录的人的总数

第二行为n个字符串，用空格间隔，表示他们的名字

第三行为n个整数，用空格间隔，表示他们的战力（单位：野猪）

## 输出

第一行为n个字符串，第二行为n个整数，为排序好的战力表（名字与战力要对应）

## 输入输出样例

输入

```java
5
迪卢克 荧 芭芭拉 可莉 琴
20 100 80 1000 120
```

输出

```java
可莉 琴 荧 芭芭拉 迪卢克
1000 120 100 80 20
```

***

## 回答要求

* 从冒泡排序/选择排序中选择一种方法完成本题。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.mcyou.cc/c++-mei-ri-yi-ti/c++-mei-ri-yi-ti-day-8-meng-de-zui-qiang-zhan-li.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
