英语题翻译23

Run Away | JXNUOJ

One of the traps we will encounter in the Pyramid is located in the Large Room. A lot of small holes are drilled into the floor. They look completely harmless at the first sight. But when activated, they start to throw out very hot java, uh ... pardon, lava. Unfortunately, all known paths to the Center Room (where the Sarcophagus is) contain a trigger that activates the trap. The ACM were not able to avoid that. But they have carefully monitored the positions of all the holes. So it is important to find the place in the Large Room that has the maximal distance from all the holes. This place is the safest in the entire room and the archaeologist has to hide there.

The input consists of T test cases. The number of them (T) is given on the first line of the input file. Each test case begins with a line containing three integers X, Y, M separated by space. The numbers satisfy conditions: 1 <= X,Y <=10000, 1 <= M <= 1000. The numbers X and Yindicate the dimensions of the Large Room which has a rectangular shape. The number M stands for the number of holes. Then exactly M lines follow, each containing two integer numbers Ui and Vi (0 <= Ui <= X, 0 <= Vi <= Y) indicating the coordinates of one hole. There may be several holes at the same position.

Print exactly one line for each test case. The line should contain the sentence "The safest point is (P, Q)." where P and Qare the coordinates of the point in the room that has the maximum distance from the nearest hole, rounded to the nearest number with exactly one digit after the decimal point (0.05 rounds up to 0.1).

翻译:

在金字塔中,我们将遇到的陷阱之一位于大房间。地板上钻了很多小孔。第一眼看起来完全无害。但是当被激活时,它们开始抛出非常热的java,呃......抱歉,熔岩。不幸的是,通往中心房间(石棺所在的地方)的所有已知路径都包含一个触发陷阱的触发器。 ACM 无法避免这种情况。但他们已经仔细监测了所有小孔的位置。因此,重要的是要在大房间中找到与所有孔的距离最大的位置。这个地方是整个房间里最安全的,考古学家必须躲在那里。

输入由 T 个测试用例组成。它们的数量(T)在输入文件的第一行给出。每个测试用例都以包含三个整数 X、Y、M 的行开始,这些整数用空格分隔。数字满足条件:1 <= X,Y <=10000, 1 <= M <= 1000。数字X 和Yin 表示Large Room 的尺寸,它是一个矩形。数字 M 代表孔的数量。然后正好有 M 行,每行包含两个整数 Ui 和 Vi (0 <= Ui <= X, 0 <= Vi <= Y),表示一个孔的坐标。同一位置可能有多个孔。

每个测试用例打印一行。该行应包含句子“The safest point is (P, Q).”。其中 P 和 Q 是房间中与最近孔距离最大的点的坐标,四舍五入到最接近的数字,小数点后恰好有一位数字(0.05 向上舍入到 0.1)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值