21613_Download

2022-5-16 18:19| 发布者: Hocassian| 查看: 35| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505690162999-Problem List-采集的数据-后羿采集器.html

Pro.ID

21613

Title

Download

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21613

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    Merlin wants to download a lot of files. But the network is so complex that he can't judge whether he can download all of the files in given time. So he wants you, the top coder of ZSU, to help him to judge whether he can download all of the files.

    At first, Merlin wants to download n files from n different websites. Each website has its download limit. That means in every second, Merlin can download part of the file of band wide size or less. Besides that, the website has its own service time. That is to say, Merlin can begin download the file in the given time, otherwise the website will reject Merlin request. At last, Merlin's computer has its service limit what is that in every second, the computer can download the file using given band wide.

    Because Merlin's computer is strong (compared of the network service), the time of combining the file can be ignore.

    So, Can you help him?

    输入

    he input will contain multiply test cases. In each test case, the fist line is three integers n, w and s ( 1 ≤ n ≤ 10, 1 ≤ s ≤ 100 ), n is the number of files to be download, w ( bit/s ) is the band wide of Merlin's computer and s is the limit second that Merlin can download all of the files.

    And then there are n lines of integers, each line stands for one file. In each line, there are four integers ai, bi, ci and di { 1 ≤ ai, bi ≤ 100000, 1 ≤ cidis ) That means the file can begin to download after the ci second and must download before the di second (download included the ci and di second), the size of file is ai ( bit ) and the band wide of this file website is bi ( bit/s ).

    The Input will be terminated by n=0.

    输出

    Description

    Merlin wants to download a lot of files. But the network is so complex that he can't judge whether he can download all of the files in given time. So he wants you, the top coder of ZSU, to help him to judge whether he can download all of the files.

    At first, Merlin wants to download n files from n different websites. Each website has its download limit. That means in every second, Merlin can download part of the file of band wide size or less. Besides that, the website has its own service time. That is to say, Merlin can begin download the file in the given time, otherwise the website will reject Merlin request. At last, Merlin's computer has its service limit what is that in every second, the computer can download the file using given band wide.

    Because Merlin's computer is strong (compared of the network service), the time of combining the file can be ignore.

    So, Can you help him?

    Input

    he input will contain multiply test cases. In each test case, the fist line is three integers n, w and s ( 1 ≤ n ≤ 10, 1 ≤ s ≤ 100 ), n is the number of files to be download, w ( bit/s ) is the band wide of Merlin's computer and s is the limit second that Merlin can download all of the files.

    And then there are n lines of integers, each line stands for one file. In each line, there are four integers ai, bi, ci and di { 1 ≤ ai, bi ≤ 100000, 1 ≤ cidis ) That means the file can begin to download after the ci second and must download before the di second (download included the ci and di second), the size of file is ai ( bit ) and the band wide of this file website is bi ( bit/s ).

    The Input will be terminated by n=0.

    Output

    If Merlin can download all of the files in given second, print one line of "yes", otherwise print one line of "no".

    Sample Input

    3 100 4
    100 50 1 2
    100 50 2 3
    100 100 4 4
    3 100 4
    100 50 1 2
    100 50 2 3
    100 100 3 3
    0

    Sample Output

    yes
    no

    Source

    样例输入

    3 100 4
    100 50 1 2
    100 50 2 3
    100 100 4 4
    3 100 4
    100 50 1 2
    100 50 2 3
    100 100 3 3
    0

    样例输出

    yes
    no

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部