QOJ.ac

QOJ

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

#22678. Moo University — اختيار الفريق

Statistics

هذا العام $N$ عجول ($1 \le N \le 1{,}000$) تتقدم لفريق جمباز Moo $U$، لكل منها طول صحيح موجب ووزن أقل من 100,000. اختر أكبر عدد ممكن. القيد الوحيد أن طول $H$ ووزن $W$ كل عجل يحققان:

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

$h$ و$w$ أقل طول ووزن بين جميع أعضاء الفريق؛ $A$ و$B$ و$C$ ثوابت صحيحة موجبة معطاة أقل من 10,000. احسب أكبر عدد عجول.

الإدخال

  • السطر 1: عدد صحيح واحد $N$.

  • السطر 2: الأعداد الصحيحة $A$ و$B$ و$C$ تفصلها مسافات.

  • الأسطر $3..N+2$: عددان صحيحان تفصل بينهما مسافة، الطول والوزن بالترتيب.

الإخراج

  • السطر 1: عدد صحيح، أكبر عدد عجول في الفريق.

أمثلة

الإدخال 1

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

الإخراج 1

5

ملاحظة

تفاصيل الإخراج

مثلًا العجول 1 و 2 و 3 و 4 و 7 تكون فريقًا صالحًا. الأكبر مستحيل.

صاحب المسألة: 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.