HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


026. 50399 - Mobile Base Station

Guest
• Review clarifications (1)

Volume problems

• 018. 50787 - Expected Value
• 019. 50438 - Pattern with stars
• 020. 50485 - Center of gravity of a ...
• 020. 50408 - Molecules
• 022. 50366 - Student Averages (2 G...
• 023. 50437 - Age Labeling
• 024. 50372 - Number Quadruplets
• 025- 2013-Nov-01. 50328 - How far ...
• 026. 50399 - Mobile Base Station
• 026. 50487 - Radius of Inscribed Circle
• 027. 50548 - Albanian Airlines
• 028. 50483 - Group Total
• 030. 50584 - Total invoice amount
• 033. 50588 - Processing the list of n...
• 035. 50573 - Count and Sum
• 040. 50335 - Five Math Operators
• 044. 50597 - Drawing Diamonds

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Mobile Base Station

A mobile service provider wants to test its base stations. The company wants to see if the number of simultaneous connections is as described in device specifications. For the test, they will provide n people in the normal coverage of base station; and then, they will compare the real connections from the station.

Question:
Write a program that is going to read the coordinates and the coverage radius of the base station and then coordinates of n people. Find how many of these people are in the coverage of the base station.

Input specification
You will be first given 3 floating point numbers: x and y coordinates of the station followed by its coverage radius. Then, you will be given an integer number (n): the number of people. The following n lines will contain two floating point numbers: x and y coordinates of every person where coordinates are floating point numbers on a plane -5000 ≤ (x,y) ≤ 5000; 0 < radius ≤ 2000 and 0 < n ≤ 5000.

Output specification
Show just one integer number: the number of people in the coverage of the station.

Sample Input I  
  10 10 5 5
  12.7 12
  7.8 6.5
  16 12
  15.1 10
  10 15
Sample Input II  
  0 -1 9 5
  9 8
  3 -5
  -9 -1
  -3 -10
  3 10
Sample Output I  
  3
Sample Output II  
  2


Для отправки решений необходимо выполнить вход.

www.contester.ru