New Building for SIS

贡献者:tourist 类别:英文 时间:2018-11-24 14:36:50 收藏数:13 评分:0
返回上页 举报此文章
请选择举报理由:




收藏到我的文章 改错字
You are looking at the floor plan of the Summer Informatics School's new building.
You were tasked with SIS logistics,
so you really care about travel time between different locations:
it is important to know how long it would take to get from the lecture room to the canteen,
or from the gym to the server room.
The building consists of n towers, h floors each,
where the towers are labeled from 1 to n, the floors are labeled from 1 to h.
There is a passage between any two adjacent towers on every floor x.
It takes exactly one minute to walk between any two adjacent floors of a tower,
as well as between any two adjacent towers, provided that there is a passage on that floor.
It is not permitted to leave the building.
You have given k pairs of locations (ta, fa), (tb, fb):
floor fa of tower ta and floor fb of tower tb.
For each pair you need to determine the minimum walking time between these locations.
For each query print a single integer: the minimum walking time between the locations in minutes.
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章热度:
文章难度:
文章质量:
说明:系统根据文章的热度、难度、质量自动认证,已认证的文章将参与打字排名!

本文打字排名TOP20

登录后可见

用户更多文章推荐