当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6936:PepperLa's Express

题目描述
PepperLa's City is a three-dimensional city whose size is $(Z*X*Y)$.

PepperLa Express is the only express in the city. The company has set up several delivery station in the city, and users will choose the nearest one.

PepperLa's vehicle is poor, it can only travel along the $Z, X, Y$ axis at the speed of one unit length per day.

Because many users complained about the delivery inefficiency, PepperLa decides to add a new delivery station in the open space. According to "barrel principle" PepperLa hopes to reduce the maximum delivery time. It means to minimize the maximum delivery time of all users.

Could You help him find the best place?
输入解释
There are multiple test cases in this problem.

For every test case, The first line has 3 interger, $Z,X,Y(1 \leq Z,X,Y \leq 10^2)$

Then following $Z\times X$ lines each line contains $Y$ characters, the character in $i$'th row (start from 0), $j$'th column is $(z=\lfloor i/X \rfloor+1,x=i\%X+1, y=j)$

'.' represents open space, '*' represents a user, '@' represents a delivery station.

The input guarantees that there is at least one '.' and at least one '@'. $\sum{Z\times X \times Y}\leq 6 \times 10^6$
输出解释
For each test case, output a single line contains one integer,representing for the minimal delivery time.
输入样例
3 3 3
...
.*.
...

@*@
*.*
@*@

...
.*.
...
输出样例
1
提示
the best place to set up a new delivery station is (z=2,x=2,y=2)
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6936

最后修改于 2021-06-22T18:18:58+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 65536/65536K(Java/Others)