303520: CF681A. A Good Contest
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A Good Contest
题意翻译
## 题目描述 在CF网站上,一个用户的名字颜色由分数决定。分数值大于等于$2400$的用户名字为红色。分数值小于$2400$且大于等于$2200$的用户名字为橙色。每次用户参加比赛,分数值都会根据他的表现变化。 Anton同学希望自己的用户颜色变红。如果他在一次比赛中超过了一些比赛开始前用户名字为红色且比赛后分数值增加了的选手,他会认为自己在这次比赛中表现出色。 Anton同学机智地写了一个程序来判断他在比赛中是否表现出色,你能做到吗? ## 输入输出格式 ### 输入格式 第一行输入一个数$n(1<=n<=100)$——Anton超过的比赛选手的数量。 接下来的$n$行描述这些选手的比赛结果:这其中的第$i(1<=i<=n)$行包括一个选手的名字$name_i$以及两个整数$before_i$和$after_i(-4000<=before_i,after<=4000)$表示一个选手在比赛之前和比赛之后的分数值。每个选手的名字是一个非空字符串,不超过十个字符,可以包括大写或小写字母,数字,以及字符"_"和"-"。 数据保证所有名字不重复。 ### 输出格式 如果Anton表现出色,输出YES,如果不出色(即没有超过一个以上规定的选手)则输出NO。 感谢 @lonelysir 提供的翻译。题目描述
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?输入输出格式
输入格式
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.
输出格式
Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise.
输入输出样例
输入样例 #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