Editing
2015 Dec Bronze Problem 2 Speeding Ticket
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Problem == Farmer John has installed a new system on the road in front of his farm in order to help enforce speed limits. The system tracks the speed of drivers by taking pictures of cars as they travel along the road. There are N (1 β€ N β€ 100) segments of the road, each with a known length L_i (1 β€ L_i β€ 100) and a legal speed limit S_i (1 β€ S_i β€ 100) that all drivers must obey. Bessie the cow is recorded travelling along the road; her speeds for each segment are known as B_i (1 β€ B_i β€ 100). Bessie is issued a speeding ticket if she exceeds the speed limit on any segment of the road. The severity of the ticket is equal to the amount by which Bessie was driving over the speed limit at the point where she was fastest relative to the speed limit. In other words, the ticket's severity is max(B_i - S_i) over all segments where she was speeding. Your task is to determine the severity of Bessie's speeding ticket.
Summary:
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information