QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22678. Moo University — tuyển đội

Statistics

Năm nay $N$ ($1 \le N \le 1{,}000$) bê thử tuyển đội thể dục Moo $U$, mỗi con cao nguyên dương và nặng dưới 100,000. Chọn nhiều nhất có thể. Chỉ một điều kiện: chiều cao $H$ và cân nặng $W$ mỗi con thỏa:

$A(H-h)+B(W-w) \le C$

$h$, $w$ là chiều cao và cân nặng nhỏ nhất toàn đội; $A$, $B$, $C$ là hằng nguyên dương đã cho dưới 10,000. Tính số bê tối đa.

Dữ liệu vào

  • Dòng 1: một số nguyên $N$.

  • Dòng 2: ba số nguyên $A$, $B$, $C$ cách nhau bằng dấu cách.

  • Các dòng $3..N+2$: hai số nguyên cách nhau bằng dấu cách, lần lượt cao và nặng.

Dữ liệu ra

  • Dòng 1: một số nguyên, số bê tối đa của đội.

Ví dụ

Dữ liệu vào 1

8
1 2 4
5 1
3 2
2 3
2 1
7 2
6 4
5 1
4 3

Dữ liệu ra 1

5

Ghi chú

Chi tiết dữ liệu ra

Ví dụ bê 1,2,3,4,7 tạo đội hợp lệ. Không thể có đội lớn hơn.

Tác giả bài toán: Brian Dean, 2001

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.