Logo
(追記) (追記ここまで)

10406번 - The fellowship of the ring 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB86476273489.078%

문제

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.

제한

예제 입력 1

80 150 3
10 100 160

예제 출력 1

1

예제 입력 2

80 150 3
80 100 150

예제 출력 2

3

예제 입력 3

2 199 5
2 1 200 199 1

예제 출력 3

2

힌트

출처

ICPC > Regionals > Latin America > Latin America Regional Contests > Latin America Regional Contests 2014 연습 세션 PA번

  • 문제를 만든 사람: Pablo Ariel Heiber
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /