CF681A.A Good Contest

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance.

Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it.

Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same?

Codeforces 用户的昵称颜色取决于其评分:若评分为 2400 或更高,则昵称显示为红色;若评分低于 2400 但不低于 2200,则显示为橙色,以此类推。每次用户参加有评级的比赛后,其评分将根据其表现进行调整。

Anton 希望自己的昵称颜色变为红色。他将自己在有评级比赛中的表现定义为“良好”,当且仅当他得分超过了某位在该比赛昵称已是红色(即赛前评分 2400\geq 2400),且在该比赛评分有所提升的参赛者。

Anton 编写了一个程序,用于分析比赛结果并判断自己是否表现良好。你能否也做到这一点?

输入格式

The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest .

The next n lines describe participants results: the i-th of them consists of a participant handle name__i and two integers before__i and after__i ( - 4000 ≤ before__i, after__i ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters.

It is guaranteed that all handles are distinct.

输入的第一行包含一个整数 nn1n1001 \leq n \leq 100)—— 表示 Anton 在本次比赛中得分超过的参赛者人数。

接下来的 nn 行描述了各参赛者的成绩:其中第 ii 行包含一个参赛者用户名 nameiname_i 和两个整数 beforeibefore_iafteriafter_i4000beforei,afteri4000-4000 \leq before_i, after_i \leq 4000),分别表示该参赛者在比赛前和比赛后的评分。每个用户名是一个非空字符串,长度不超过 10 个字符,可由小写和大写英文字母、数字以及字符 «_» 和 «-» 组成。

保证所有用户名互不相同。

输出格式

Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise.

如果安东在比赛中表现良好,则输出 «YES»(引号仅用于明确显示);否则输出 «NO»(引号仅用于明确显示)。

输入输出样例

  • 输入#1

    3
    Burunduk1 2526 2537
    BudAlNik 2084 2214
    subscriber 2833 2749

    输出#1

    YES
  • 输入#2

    3
    Applejack 2400 2400
    Fluttershy 2390 2431
    Pinkie_Pie -2500 -2450

    输出#2

    NO

说明/提示

In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest.

In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.

在第一个样例中,Anton 的得分超过了用户名为 Burunduk1 的用户,该用户的用户名在比赛前被标为红色,且其评分在比赛后有所提升。

在第二个样例中,Applejack 的评分在比赛后并未提升,而 Fluttershy 和 Pinkie_Pie 的用户名在比赛前均未被标为红色。

输入解题思路,AI测评打分。不知道怎么写?

首页