• 2475 Survivors

    时间限制 : 4000/2000 MS(Java/Others) | 内存限制 : 65536/32768 KB(Java/Others)

    提交数 : 95 | 通过数 : 17

    题目描述

    As you know, every people in the world has three properties: strength, dexterity and intelligence. If there is some one with all three properties equal or better than you, you will be washed out. The people who won't be washed out are called 'survivor'.
    
    Now there are some people, find the number of the survivors.
    
    NOTE: No two people have totally same properties.

    输入要求

    The first line contains an integer N (1 <= N <= 10^5) , which means the number of people.
    
    Each of the next N lines contains three integers ai,bi,ci (1 <= ai,bi,ci <= 10^5) , which means the values of the i-th people's strength, dexterity and intelligence.

    输出要求

    Print the number of the survivors.

    输入样例

    4
    1 2 3
    1 2 2
    1 1 1
    1 1 1000

    输出样例

    2

    提示

    Only the 1st and 4th people will survive.
    
    PS: N is 100000!! It's really large!!! Solving it by brute force is IMPOSSIBLE!!!

    来源

    NBU OJ

    [ 返回顶端 ] | [ 代码提交 ] | [ 统计数据 ] | [ 历史提交 ]