This is for a beginner level problem at TopCoder.com.
A speed radar is installed in a highway zone where the maximum speed limit is maxLimit mph, and the minimum speed limit is minLimit mph. Any reading that is strictly above or below this interval is an infringement.
Periodically, the radar readings are analyzed to make sure that the sensors are working properly. It is assumed that most drivers obey speed limits, and therefore, the radar will be considered faulty if more than 10% of its readings are infringements.
Given the radar readings over a period of time, return the average speed of all cars that are driving within the speed limits. If the radar is faulty, return 0.0.
This is the compiling error it gives me when trying with their portal:
Your code did not compile:
errors compiling:
end of your submission:10030: error: multiple types in one declaration
It might be something minor but if anyone can offer some insight, I'd be very appreciative.