Building a distribution table
Time limit1sMemory limit512 MB
Given real numbers in [0,1), count how many fall into each of m equal-length subintervals and print the counts in order.
- Level
Easy2 of 10
- Topics
- Implementation, Array, Math
- Solved
- No attempts yet
Problem
You are given real numbers , each at least and less than . Split the interval into subintervals of length and name them from left to right.
- :
- :
- :
Count how many of the given numbers fall into each subinterval.
Input
The first line contains the number of subintervals ().
The second line contains the real numbers separated by single spaces. itself is not part of the input, and . Each number satisfies and is given with at most six digits after the decimal point.
Output
Print the count of numbers in on one line, separated by single spaces.