HBC51036AWarmWelcome,语言题The Buses题解

回忆凄美了谁 算法基础篇 40 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
A man arrives at a bus stop at 12:00. He remains there during 12:00-12:59. The bus stop is used by a number of bus routes. The man notes the times of arriving buses. The times when buses arrive are given. Buses on the same route arrive at regular intervals from 12:00 to 12:59 throughout the entire hour. Times are given in whole minutes from 0 to 59. Each bus route stops at least 2 times. The number of bus routes in the test examples will be ≤17leq 17≤17. Buses from different routes may arrive at the same time. Several bus routes can have the same time of first arrival and/or time interval. If two bus routes have the same starting time and interval, they are distinct and are both to be presented. Find the schedule with the fewest number of bus routes that must stop at the bus stop to satisfy the input data. For each bus route, output the starting time and the interval.

A man arrives at a bus stop at 12:00. He remains there during 12:00-12:59. The bus stop is used by a number of bus routes. The man notes the times of arriving buses. The times when buses arrive are given.  Buses on the same route arrive at regular intervals from 12:00 to 12:59 throughout the entire hour.  Times are given in whole minutes from 0 to 59.  Each bus route stops at least 2 times.  The number of bus routes in the test examples will be ≤17leq 17≤17.  Buses from different routes may arrive at the same time.  Several bus routes can have the same time of first arrival and/or time interval. If two bus routes have the same starting time and interval, they are distinct and are both to be presented. Find the schedule with the fewest number of bus routes that must stop at the bus stop to satisfy the input data. For each bus route, output the starting time and the interval. 

HBC51036AWarmWelcome,语言题The Buses题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
成为编程大师,不再是梦想!全网最全C++题库,助您开启编程新篇章。

标签: HBC51036AWarmWelcome 语言题The Buses题解