407793: GYM102894 A Big Brother Is Watching You

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Big Brother Is Watching Youtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output"Kétszázhúsz felett észre sem veszed,"Neoton Familia

After a resounding financial success, the owner of the Nikola company decided to offer the Berland Police Department unmanned vehicles equipped with a radar that will measure the speed of passing cars. According to the CEO, such cars will help maintain discipline on the roads of the state.

The unmanned vehicle moves at a speed of $$$x$$$ km/h, and the speed limit is $$$y$$$ km/h $$$(y \ge x)$$$. The main issue with the radar is that it measures the speed of passing cars relative to it, and also does not distinguish whether the car is overtaking a police car (or even moving towards it) or vice versa — the radar only records the speed.

You were asked to write a program that determines how many times the speed limit was broken — that is, when a vehicle's speed (relative to the ground) was strictly greater than the speed limit.

Since the data is ambiguous and the same result can be counted differently depending on the direction of movement and/or the actual speed of the car, output the minimum possible number of offenses and the maximum possible number of offenses recorded by the car.

Input

The first line contains the number $$$ n $$$ $$$ (1 \le n \le 10 ^ 5) $$$ — the number of speed measurements made by the car.

The second line contains the number $$$ x $$$ $$$ (1 \le x \le 10 ^ 5) $$$ — the speed of the car.

The third line contains the number $$$y$$$ $$$ (1 \le y \le 10 ^ 5) $$$ — the speed limit. It is guaranteed that $$$ x \le y $$$.

The next $$$n$$$ lines contain one integer each, $$$s_i$$$ $$$ (1 \le s_i \le 10 ^ 5) $$$ — the speeds recorded by the radar.

Output

Output two numbers separated by a space — the minimum possible and maximum possible number of recorded speed limit violations, respectively.

Scoring

PointsLimitsDependenciesGrading policy
1100--each test

ExampleInput
2
50
70
60
15
Output
0 1
Note

If the first car was moving in the same direction as the police car, then its speed was $$$ 50 + 60 = 110$$$ km/h — a speed limit violation. But it could also move in the opposite direction: then its speed was only $$$ 10$$$ km/h.

The speed of the second car relative to the ground is $$$ 50 + 15 = 65$$$ km/h — below the speed limit or $$$ 50 - 15 = 35$$$ km/h — also below the speed limit (in both cases, the car was moving in the direction of the police car).

加入题单

上一题 下一题 算法标签: