시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 256 MB | 584 | 513 | 495 | 88.710% |
Box is a really violent sport. To compensate, there is a code of conduct to maintain chivalry and fellowship atop the ring in friendly matches. One of the most well known rules of this code of conduct is to avoid hitting the opponent below the waist or above the neck.
Given the heights of the waist and neck of an opponent, and the heights of a set of punches, calculate how many of those punches are fair according to the rule above.
The first line contains three integers W, N and P, representing respectively the height of the waist of the opponent, the height of his neck, and the number of thrown punches (1 ≤ W < N ≤ 200 and 1 ≤ P ≤ 100). The second line contains P integers H1, H2, . . . , HP (1 ≤ Hi ≤ 200 for i = 1, 2, . . . , P) indicating the heights of the punches. All heights are given in centimeters.
Output a line with an integer representing the number of punches that are fair, according to the code of conduct.
80 150 3 10 100 160
1
80 150 3 80 100 150
3
2 199 5 2 1 200 199 1
2
ICPC > Regionals > Latin America > Latin America Regional Contests 2014 PA번