PAT甲级1018. Public Bike Management 题意: 杭州市有公共自行车服务,为世界各地的游客提供了极大的便利.人们可以在任何一个车站租一辆自行车,并将其送回城市的任何其他车站. 公共自行车管理中心(PBMC)不断监测所有车站的实时能力. 如果一个车站正好半满,那么一个车站据说处于完美的状态.如果车站充满或空,PBMC将收集或发送自行车,以调整该车站的状况.此外,所有的车站也将进行调整. 当报告问题站时, PBMC将始终选择到达该站的最短路径.如果有多于一条最短路径,则需要…
1018 Public Bike Management (30 分) There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the city. The Pub…
PAT甲级:1136 A Delayed Palindrome (20分) 题干 Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)st number is a kind of description of the nth number. For ex…