Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ECOO ' 1 8 R 1 P 2 - Rue's Rings A local street planning consulting company, Rue's Rings, is looking to help the city

ECOO '18 R1 P2- Rue's Rings
A local street planning consulting company, Rue's Rings, is looking to help the city prepare for converting a lot of their
medium-traffic one-lane intersections into roundabouts.
After generating a plan, the city wants to run a simulation to see where the possible bottlenecks of traffic could be. The
simulation runs by finding the roundabouts along a route and then figuring out which roundabout is the smallest in
diameter. The smallest diameter roundabout would be the best possible location for congestion and creating a
bottleneck of traffic which would make the traffic patterns even worse than they are now.
There are N roundabout-filled routes from the starting point to the endpoint. Your task as the city simulation specialist,
is to analyze the different routes that are available to find out which route (or routes) could generate the most issues.
Input Specification
The standard input will contain 10 datasets. Each dataset begins with an integer N(2N700), the number of
routes. The next N lines each contain a series of integers describing a route.
The first integer of each route description is the ID for the route. The second integer R(1R70) is the number of
roundabouts along the route. R integers follow which describe the diameter D(1D70000) of each roundabout
along the route.
Output Specification
For each dataset, output the minimum roundabout diameter along a route followed by a brace-enclosed, sorted list of
route IDs for the routes that could cause issues.
Sample Input (Two Datasets Shown)
3
1,6,4,5,2,6,3,2
2,3,2,3,4
3,4,2,3,2,4
4
1,2,3,4
23424
3723,3,4,5,6
4532514
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions