Limits 1s, 512 MB

Nowadays, CS students try to learn Machine Learning and Artificial Intelligence even before learning the basics of programming which is obviously problem-solving. Eventually, they lose their curiosity about AI as well as CS.

Professor Bakhtiar got very anxious about it and discussed it with his colleague Professor Badhon. They came up with a solution and thought of experimenting if it works or not. But they don't have enough time to build a system from scratch as they got a conference to attend next week. So now you have to implement the system.

The idea is as to take students who are good at problem solving. You will be given a list of n students with the total number of accepted solutions m and total number of submissions s for each student. If anyone has:

  • solved at least 150 problems,
  • solved more than or equal to the average number of accepted solutions among students, and
  • has no less than 70% acceptance rate

they will be allowed to study AI, otherwise not. You have to count the number of students eligible to study AI.


Input starts with an integer n(0 < n <= 106), denoting number of students.

Next n lines contains two integer each m, s (0 < m, s <= 109) , described above.


In one line, Print the answer.


10 10
150 214
200 300
1000 1300
100 300


Login to submit.


69% Solution Ratio
BigO_cutterEarliest, Dec '19
nusuBotFastest, 0.0s
mdvirusLightest, 2.1 MB
realshourovShortest, 194B
Toph uses cookies. By continuing you agree to our Cookie Policy.