#P6481. [CRCI2006-2007] FIREFLY
[CRCI2006-2007] FIREFLY
Background
A Japanese firefly flies into a cave full of obstacles.
Problem Description
There are two kinds of obstacles in the cave: stalagmites (growing upward from the ground) and stalactites (hanging down from the ceiling). The cave is units long and units high. From left to right, the first obstacle is a stalagmite; then stalactites and stalagmites appear alternately.
The picture below shows an example cave with length units and height units:

This Japanese firefly will not avoid obstacles. It only flies at a fixed height. With its superb skills, it can start from one end of the cave and, at some height, break through all obstacles to reach the other end.

For example, in the picture above, if the firefly chooses height to fly, it will hit a total of obstacles.
But this is not the best choice. Because if it flies at height or height , it only needs to break through obstacles.
To reduce the pain, you need to help the firefly find the minimum number of obstacles it must destroy, and how many different heights achieve this minimum.
Input Format
The first line contains two integers , representing the length and height of the cave. The testdata guarantees that is even.
The next lines each contain one integer, representing the length of an obstacle. It is guaranteed that all obstacle lengths are less than .
Output Format
Output one line with two integers: the minimum number of obstacles that must be destroyed, and the number of different height choices that achieve this minimum.
6 7
1
5
3
3
5
1
2 3
14 5
1
3
4
2
2
4
3
4
3
3
3
2
3
3
7 2
Hint
Constraints
For of the testdata, it is guaranteed that and .
Notes
Translated from COCI2006-2007 Regional Competition T3 FIREFLY。
Translated by ChatGPT 5